Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 rifling through the Monastery: (7)
As of 2015-07-06 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls