Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^8: Sort alphabetically from file

by hippo (Bishop)
on Jun 18, 2019 at 09:03 UTC ( #11101507=note: print w/replies, xml ) Need Help??


in reply to Re^7: Sort alphabetically from file
in thread Sort alphabetically from file

so shift physically removes the entry in @ARGV? this is interesting and i did not realize that

Indeed it does:

$ cat shifter.pl #!/usr/bin/env perl use strict; use warnings; do { print "ARGV is @ARGV\n"; print "Shifting " . shift . " off ...\n"; } until $#ARGV < 0; $ ./shifter.pl x y z ARGV is x y z Shifting x off ... ARGV is y z Shifting y off ... ARGV is z Shifting z off ... $

See perldoc -f shift for more.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11101507]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-12-10 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?