http://www.perlmonks.org?node_id=1039030


in reply to Re: Whats with the autoincrementation of a string
in thread Whats with the autoincrementation of a string

Not quite independently. Any numeric wheels must be at the back.

e.g. 'Aa00' will work, '00Aa' won't.

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)
  • Comment on Re^2: Whats with the autoincrementation of a string

Replies are listed 'Best First'.
Re^3: Whats with the autoincrementation of a string
by LanX (Saint) on Jun 14, 2013 at 21:36 UTC
    Sure, anything with leading digits which isn't a proper number is dealt by atoi in numeric context, IIRC that's due to some C legacy.

    DB<109> @a=a..c => ("a", "b", "c") DB<110> $a[" 1x"] => "b"

    plz note: only with no warnings!

    Cheers Rolf

    ( addicted to the Perl Programming Language)