in reply to Re: Re: Efficienty truncating a long string
in thread Efficienty truncating a long string
my $long_string = 'string' x 5; print $long_string,$/; substr( $long_string, 6 ) = ''; # truncate to 6 characters # # same thing, only using 4 arg substr # substr( $long_string, 6, length($long_string) - 6, '' ); # print $long_string,$/; __END__ stringstringstringstringstring string
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Efficienty truncating a long string
by ysth (Canon) on Dec 18, 2003 at 10:03 UTC | |
by dino (Sexton) on Dec 18, 2003 at 10:28 UTC | |
by ysth (Canon) on Dec 18, 2003 at 16:40 UTC | |
|
Re: Re: Re: Re: Efficienty truncating a long string
by dino (Sexton) on Dec 18, 2003 at 09:50 UTC |