Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

The "<" in the grep block

by vagabonding electron (Curate)
on Sep 23, 2012 at 14:56 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found