Berkeley CSUA MOTD:Entry 17782
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/25 [General] UID:1000 Activity:popular
12/25   

2000/3/16-17 [Computer/SW/Languages/Perl] UID:17782 Activity:moderate
3/16    When I do some pattern Matching in a Perl script on the string
        in the arguement $_[0] to a subroutine, it seems that $_[0]
        itself gets modified.  Is this normal?  I thought backrefrencing
        affects $digit but not the argument array @_.
        \_ "argument"
        \_ just have a temp value to preserve it before you call the
           subroutine. some of the mysteries of perl seem to be not
           clear no matter how many times you scour the O'Reily series
           \_ I did try that and it worked and I concur with the observation
                about perl in general.  It perhaps shows how match (not
                substitution) really works.
        \_ @_ is passed in by reference.