Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The output becomesprint "$line =~ s/^\s+|#//; #trim leading spaces and comment hash\n"; print "$line =~ s/\s+$|\///; #trim trailing spaces and forward slash\n +";
Any insight will be helpful. I've tried breaking it up into pieces and concatenating but that causes errors.$line =~ s/^s+|#//; #trim leading spaces and comment hash $line =~ s/s+0///; #trim trailing spaces and forward slash
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Code generation. Printing out regular expressions
by roboticus (Chancellor) on Jan 14, 2010 at 22:16 UTC | |
by Anonymous Monk on Jan 14, 2010 at 22:31 UTC | |
|
Re: Code generation. Printing out regular expressions
by johngg (Canon) on Jan 14, 2010 at 22:57 UTC |