in reply to cut of first char of a string

How many ways does Perl have to cut off the first char of a string?

An infinite number, of course.

For example, there are an infinite number of variations of the following solution:

Append a string known not to be within the string, move the first character after the unique tag, then remove everything after the unique tag.

You can increase the length of the unique tag string towards infinity, and you'll get an infinite number of solutions.
--
Ytrew

Replies are listed 'Best First'.
Re^2: cut of first char of a string
by sh1tn (Priest) on Mar 09, 2005 at 00:56 UTC
    $_ = '12345';$_ = join'',(@{[split//]}[1..@{[split//]}]) # ?