mmh... Your code don't show nothing in my computer (?)
My code should work fine anywhere. Post the exact code you are using that is failing.
open (my $foo, $0); print $foo; close $foo; What I'm doing wrong?
You are never reading from the file you opened.
You are printing the filehandle you opened.
Perhaps you meant:
open (my $foo, $0); print <$foo>; close $foo;
In reply to Re^3: get current script as text
by BrowserUk
in thread get current script as text
by vlad_tepesch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |