Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

The "<" in the grep block

by vagabonding electron (Hermit)
on Sep 23, 2012 at 14:56 UTC ( #995208=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -l
    use strict;
    ...
    @ARGV = map{glob} @ARGV;
    my @selection =  grep { -s < 1000 } @ARGV;
    print for @selection;
    
  2. or download this
    Warning: Use of "-s" without parentheses is ambiguous at script.pl lin
    +e 7.
    Unterminated <> operator at script.pl line 7.
    
  3. or download this
    #!/usr/bin/perl -l
    use strict;
    ...
    @ARGV = map{glob} @ARGV;
    my @selection =  grep { (-s) < 1000 } @ARGV;
    print for @selection;
    
  4. or download this
    my @smaller_than_1000 = grep { -s < 1000 } @ARGV;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://995208]
Approved by McDarren
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-11-28 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls