uday_sagar has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
my $out = substr("some/very/varied_length/string",-6);is giving me "string" in $out.
But I want the other part "some/very/varied_length/" Here I am interested in a general code which works with the changes in length of "varied_length" of the above string.
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: accessing a part of a string
by Anonymous Monk on May 18, 2012 at 11:12 UTC | |
|
Re: accessing a part of a string
by phenom (Chaplain) on May 18, 2012 at 11:11 UTC | |
by Eliya (Vicar) on May 18, 2012 at 11:30 UTC |