go ahead... be a heretic | |
PerlMonks |
Re: Different behavior when parsing $0 on Solaris and Win32by liverpole (Monsignor) |
on Sep 28, 2011 at 12:55 UTC ( [id://928314]=note: print w/replies, xml ) | Need Help?? |
Hi dirac,
When a script doesn't work as expected, you need to debug it. To aid in that venture, be verbose. Don't get fancy and try to do everything in a single line (eg. my $log_file = (split /\./, $0)[0] . '.log';). Rather, do the minimum possible in each step, and display all intermediate results, such as:
You should never find yourself saying "I know the contents of the variable should be X at this point". Rather, "I think the contents of the variable should be X, so I'll print them out to be sure..." s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|