Hi Richard
On Sat, 2009-09-19 at 13:11 +0100, Richard Jones wrote:
> Yep, though I didn't claim mine was either (just personal preferences at
> work here, and the temptation to hack to see what can be done), and the
> use of IO::All in place of manual file handling.
Nothing wrong with personal preferences, especially if they're
mine :-)).
> And this also works for me:
>
> $lines += grep { s/^\s+|\s+$//; $_ !~ /^[{}]?$|^#/; } io($_)->chomp->slurp;
Errr. What happens with a line which has /both/ leading and trailing
spaces?
--
Ron Savage
[email protected]
http://savage.net.au/index.html
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################