[plug] perl question

Alex Nordstrom alexander.nordstrom at tpg.com.au
Thu Sep 23 12:05:56 WST 2004


On Thursday, 23 Sep 2004 11:51, Patrick Tehvand wrote:
> Quick one, Can someone tell me if there is a function to strip the
> first character off a variable?
>
> sort of like chop except at the other end?

Not that I know of; I'm not sure, but I believe it would not be possible 
to do with the same efficiency. I would just use "s/^.//s" or substr 
with a starting value of 1 and no length argument. They should achieve 
the goal, even if they are costlier than a chop.

-- 
Alex Nordstrom
http://lx.n3.net/
Please do not CC me in followups; I am subscribed to plug.



More information about the plug mailing list