Re: help with perl equivalent ?
| From: | R'twick Niceorgaw | Date: | Fri, 24 Jan 2003 16:17:13 +0000 |
| Subject: | Re: help with perl equivalent ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133006@lists.php.net to get a copy of this message | ||
Thanks Sean
That worked :)
-R'twick
----- Original Message -----
From: "Sean Burlington" <sean@uncertainty.org.uk>
To: "R'twick Niceorgaw" <public@utkalika.net>
Cc: "php" <php-general@lists.php.net>
Sent: Friday, January 24, 2003 11:07 AM
Subject: Re: [PHP] help with perl equivalent ?
> R'twick Niceorgaw wrote:
> > Hi all,
> > I'm pretty much a stranger to perl and now got to convert a perl script
to
> > php. however, at once place I can not understand what the lines are
doing
> > and what could be the equivalent of them in php. Could some one help me
with
> > this ?
> >
> > Here's my perl code :
> >
> > $choice=~s/\.rm//;
> $choice = str_replace('.rm', '', $choice);
> > $choicedir=substr($choice, 0, 3);
> $choicedir=substr($choice, 0, 3);
> > $choicedir=~s/^AKM/ogx/
> $choice = preg_replace('/^AKM/', 'ogx', $choice);
>
>
>
> --
>
> Sean
>