$var =~ s/.{4}$//;

Rgds,
Connie


----- Original Message -----
From: "David Samuelsson (PAC)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 8:00 PM
Subject: Remove 4 last letters


> This should be really simple, just use a regexp to remove the 4 last letters from a 
>variable.
>
> $variable =~ /\S\S\S\S$/;
> print "$variable";
>
> but this doesnt remove the 4 last letters when i run it, i think i am just getting 
>tired here and cant see why, what
is the right way to do it? :)
>
> //Dave
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to