in reply to perl grep
The "fat arrow" => is often also called the "fat comma", because it functions the same as the comma. So the following two pieces of code are the same, functionally:
grep /regex/ => @_; # and grep /regex/, @_;
I think that perldoc perlop discusses the peculiarities of the fat arrow, but for many cases, you can simply replace the arrow by a comma.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl grep
by RandomWalk (Beadle) on Nov 22, 2003 at 17:15 UTC | |
by Corion (Patriarch) on Nov 22, 2003 at 17:27 UTC |