Altough it is not "wrong" there is no reason at all to initialize a lexical variable to the empty string (or zero) as the my takes care of creating a brand new "empty" variable with the value of undef, empty string or zero (depending on how you look at it).my $newstr = '';
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re^3: The simplest perl Multi Line matching.
by CountZero
in thread The simplest perl Multi Line matching.
by dannyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |