http://www.perlmonks.org?node_id=11119047


in reply to Re^6: Perl custom sort for Portuguese Lanaguage
in thread Perl custom sort for Portuguese Lanaguage

This works for me: csv (in => 'quux.csv', filter => {1 => sub { !/^#/ }});

Unfortunately that also filters lines whose first field is "#foo" (with the quotes). I remember Tux recently saying filtering before parsing wasn't supported, though I'm having trouble finding the reference at the moment (it could have been in the chatterbox too*). It may be a bit tricky because this is valid CSV too:

abc,"d #e f",ghi

(That's one row, ["abc", "d\n#e\nf", "ghi"].)

* Update: I looked again and I think it must have been in the chatterbox; I do distinctly remember someone having a similar question recently...