in reply to Appending characters to an existing string
First up, nice and short:
then of course there's the ever faithful:$a .= ".pl";
then of course we could get a little tricky:$a = "$a.pl";
or just plain ridiculous:$a = pack("A*A*",$a,".pl");
and onto the sublime:my $x = sub {return shift() . shift()}; $a = &$x($a,".pl");
rdfield$a=~s#$#.pl#;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Appending characters to an existing string
by Sihal (Pilgrim) on Nov 22, 2002 at 10:34 UTC |