in reply to Re: Looking for small csv files script question
in thread Looking for small csv files script question

Thanks I'll give that a go.

I thought this might do the trick (It's doing something at least).

sub csvfile { if ((stat($File::Find::name))[7] <= 5500) { push @files, $File::Find::name if -f && /\.csv/; } }

Replies are listed 'Best First'.
Re^3: Looking for small csv files script question
by PerlPlay (Novice) on Dec 04, 2013 at 02:17 UTC

    Tried your example and it comes up with this.

    Warning: Use of "-s" without parentheses is ambiguous at csvfile.pl line 21. syntax error at csvfile.pl line 21, near "/\.csv/ -s " Unterminated <> operator at csvfile.pl line 21.

      Look at the error:

      ... near "/\.csv/ -s " ...

      You're missing the "&&" between "/\.csv/" and "-s".

      -- Ken