Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

chop() and list assignments

by converter (Priest)
on Mar 06, 2001 at 07:05 UTC ( [id://62423]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {chop(@_=@_)}
    
  2. or download this
    @a = ('ab','cd','ef');
    print chop @a;     # f
    ...
    
    # the list assignment has the same effect here:
    print chop(@a=@a); # b
    
  3. or download this
    sub foo {chop(@_=reverse @_)}
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-18 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found