Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Make things a *little* easierby John M. Dlugosz (Monsignor) |
on Sep 12, 2002 at 14:49 UTC ( [id://197238]=note: print w/replies, xml ) | Need Help?? |
the advantage this has over the 4-arg substr is that you don't need to put the number of chars to replace in the string (which would always be the absolute value of the negative offset in situations like this);
I noticed that. If you leave off the argument, it automatically takes the rest of the chars to the end. If you want to give a 4th argument, you can't leave off the 3rd. But, shouldn't passing undef for the 3rd argument mean the same thing as leaving it off? That's what I would expect.
In Section
Meditations
|
|