$var = "VARIABLE"; END {print "this is at the end:$var\n";} BEGIN {print "this is in the beginning:$var\n";} ##OUTPUT: $ perl script.pl this is the beginning: this is at the end:VARIABLE
Try running your script without the BEGIN.
--
hiseldl
What time is it? It's Camel Time!
In reply to Re: Need help with a variable
by hiseldl
in thread Need help with a variable
by cal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |