CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
accessing variable

 



perlnewbie123
New User

Apr 11, 2008, 11:11 AM

Post #1 of 2 (385 views)
accessing variable Can't Post

Hi,

Hi Everyone. How do I can setup my $author variable so that it is accessible to the wanted function callback, count_written, that I pass to find?

-------------
use File::Find;
use strict;

my $workspace = "C:\\";
my $author = "authorsname";

# get the line countes
find (\&count_written, ("$workspace"));

sub count_written {
if (m/$author/) {
print "foo\n";
}
}


KevinR
Veteran


Apr 11, 2008, 2:53 PM

Post #2 of 2 (382 views)
Re: [perlnewbie123] accessing variable [In reply to] Can't Post

Explain better what you are trying to do.
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives