Elias Assmann wrote:
> On Tue, 11 Jun 2002, Jeff 'japhy' Pinyan wrote:
>
> > modifies the ACTUAL argument you passed to rcsname()? Only if you had
> > done
> >
> > sub rcsname {
> > $_[0] =~ s/foo/bar/;
> > }
> > or some other specific effort would you have modified the argument to the
> > function.
>
> So Perl passes subroutine arguments by reference? I thought they
> would be copies in the first place...
No the args are only copies not references. The question was to return a modifed form
of the argument without changing the argument. After the s/... statement the contents
of the argument to rcsname i.e. $_[0] or some variable in rscname into which it has
been
shifted to should not change.
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]