CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Clip letters from a string>>

 



jbs
Deleted

Aug 9, 2000, 3:10 PM

Post #1 of 2 (286 views)
Clip letters from a string>> Can't Post

If I have the following dummy string:

$dummy='abcdef';

How do I clip the first three characters with
out matching them? Such that I get:

#after clipping operation

$dummy='def';

Any help would be appreciated!


Kanji
User / Moderator

Aug 9, 2000, 3:40 PM

Post #2 of 2 (286 views)
Re: Clip letters from a string>> [In reply to] Can't Post

substr( $dummy, 0, 3, "" );

... although that doesn't appear to work in 5.004, so you could also try ...

$dummy = substr( $dummy, 3 );

... if you don't have 5.005_03 or higher.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives