in reply to Remove leading character from string
use strict; use warnings; $_="1234"; $_=join '', reverse split ''; chop; $_=join '', reverse split ''; print ;
or
print drop_the_first('1234'); sub drop_the_first { split '', shift; shift; return join '',@_; }
But that last one only works in a subroutine and give a deprecation warning.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Remove leading character from string
by Anonymous Monk on Feb 02, 2004 at 07:26 UTC | |
|
Re: Re: Remove leading character from string
by japhy (Canon) on Feb 02, 2004 at 14:18 UTC |