automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl Bug?


From: Akim Demaille
Subject: Re: Perl Bug?
Date: 02 Feb 2001 14:49:46 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

| akim <address@hidden> writes:
| >  sub scan_autoconf_config_files
| >  {
| > +    print STDERR "=>> @_\n";
| > +    print STDERR "==>> $_\n";
| 
| Why do you expect $_ to contain anything in particular at this point?
| You've not assigned anything to it in this sub.  $_ is a completely
| separate variable from @_; they're utterly unrelated.
| 
| The arguments to a sub appear in @_.

Aaaarg!  Thanks!  In fact much of my learning Perl comes from reading
Automake, and scan_autoconf_config_files was precisely using $_ as if
it were the argument.  So I really believed $_ was $_[0].  As
explained by Derek it worked precisely because
scan_autoconf_config_files was called with $_ as argument...

Thanks a lot for the clarification.  I think I'll buy some Perl book :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]