2) I have this line that I was rather proud of: warn("$0 started running at ", scalar(localtime()), ' with switches ', defined(my $switches_text = join ', ', keys %switches) ? $switches_text : "(none)", "\n"); Fails, though. Apparently I need to declare $switches_text with my earlier, because it works if I put a my $switches_text on the line above. Anyone got any idea why? I was hoping I could fit it all onto one line.
warn("$0 started running at ".localtime().' with switches ', (%switche +s ? join ', ', keys %switches : "(none)"), "\n");
-- Randal L. Schwartz, Perl hacker
In reply to Re: duplicate $_ while reading files; my compactness; code structure
by merlyn
in thread duplicate $_ while reading files; my compactness; code structure
by Amoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |