in reply to Re: declaring variable
in thread declaring variable

or,
$pass = 'blue'; $pass =~ s/^(.+)$/5${1}5/;


holli, /regexed monk/

Replies are listed 'Best First'.
Re^3: declaring variable
by RazorbladeBidet (Friar) on Feb 14, 2005 at 20:49 UTC
    or

    $pass = 'blue'; $pass = '5'.(' ' x length($pass)).'5' | ' '.$pass.' '
      or

      $pass = 'blue'; $pass =~ s/.{4}/($i=1+length($pass)).$pass.$i/e;