Home : General : Perl Programming :

General: Perl Programming: Re: [RedRum] Do I use substr or s///g; ?: Edit Log

Here is the list of edits for this post
Re: [RedRum] Do I use substr or s///g; ?
I don't get any errors when I run this:
Code:
$date = '11/01/2001';
{
$date =~ s;\d\d(\d\d)$;$1;
}
print $date
which is what I meant by:
Quote:
it's perfectly acceptable (even suggested in perldoc) to omit the ';' from the last line of code in a block

--Philip
Links 2.0 moderator

Last edited by:

PerlFreak: Nov 1, 2001, 12:03 PM

Edit Log: