Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

The "<" in the grep block

by vagabonding electron (Chaplain)
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 meditating upon the Monastery: (7)
As of 2016-07-01 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (405 votes). Check out past polls.