On Thu, March 5, 2009 1:12 pm, Shlomi Fish wrote:
> my $filename = "hello.txt";
>
> sub print_filename {
>     print $filename, "\n";
> }

One thing you can do is to do the initialization at compile time:

    my $filename;
    BEGIN { $filename = "hello.txt" }


_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to