On Thu, 14 Feb 2002, Chris wrote:

> if left($result,3) = "500" Then
>     Do whatever
> Else
>      Blah Blah Blah
> End If
>
> In Perl I want to do:
>
> if (left($result), 3) = 500 {
>     Do whatever;
> } else {
>      Blah Blah Blah;
> }
>
> How can I do the left in Perl????

if(substr($result, 0, 3) == 500) {

perldoc -f substr

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Who made the world I cannot tell;
'Tis made, and here am I in hell.
My hand, though now my knuckles bleed,
I never soiled with such a deed.
                -- A.E. Housman


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

Reply via email to