> -----Original Message-----
> From: John Edwards [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 27, 2001 8:25 AM
> To: 'GRANATA ROBERTA'; [EMAIL PROTECTED]
> Subject: RE: Delete the first char of a string with one 
> pattern matching
> 
> 
> $string = "1test";
> 
> $string =~ s/.//;
> 
> print $string;

What if $string is "\nHello". Your regex deletes the 'H',
because . does not match \n. You would need to add the /s
modifier.

The substr method is much better, IMO.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to