in reply to Re: Stopping empty files from been pushed into an array.
in thread Stopping empty files from been pushed into an array.

What is len()? :P

Replies are listed 'Best First'.
Re^3: Stopping empty files from been pushed into an array.
by FreeBeerReekingMonk (Deacon) on May 13, 2015 at 22:33 UTC

    Why, it is of course:

    sub len{ return do { local(@ARGV, $/) = $_[0]; <> } =~ y===c; }

    :P

    Disclaimer: use -s $filename. This code is ineficient and ment as a timtoady

Re^3: Stopping empty files from been pushed into an array.
by roboticus (Chancellor) on May 14, 2015 at 02:43 UTC

    Your Mother:

    len() is a function that gives you the length of things....


    ...in python

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.