stuffy has asked for the wisdom of the Perl Monks concerning the following question:
this works as planned, every time the program runs across the date, it is output on the screen. I'm assuming that $date is scoped in the while loopsub meat_and_potatoes_of_program { while (<my_file>){ /(\w{3}\s+\w{3}\s+\d{1,2}/; my $date = $1; print "date \n <br>";
if ($foo) { print "the date is... $date \n <br>"; }
sub the_meat_and_potatoes_of_program{ my $pass_down_date = 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scoping Variables
by azatoth (Curate) on May 17, 2001 at 14:00 UTC | |
|
Re: Scoping Variables
by arturo (Vicar) on May 17, 2001 at 18:30 UTC | |
by stuffy (Monk) on May 18, 2001 at 08:08 UTC | |
|
Re: Scoping Variables
by shotgunefx (Parson) on May 17, 2001 at 14:57 UTC | |
|
Re: Scoping Variables
by mothra (Hermit) on May 17, 2001 at 20:10 UTC | |
by Clachair (Acolyte) on May 18, 2001 at 07:28 UTC | |
by Anonymous Monk on May 18, 2001 at 18:13 UTC | |
by Anonymous Monk on May 18, 2001 at 18:14 UTC | |
by Clachair (Acolyte) on May 19, 2001 at 03:37 UTC | |
|
Re: Scoping Variables
by ozzy (Sexton) on May 17, 2001 at 17:19 UTC |