in reply to
Passing value outside of loop
I believe that your variable $file is only available inside the while loop because of scope (someone feel free to correct me if I'm mistaken). You should put the
my $file
before the start of the while loop.
Comment on
Re: Passing value outside of loop
Download
Code
In Section
Seekers of Perl Wisdom