Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Split help

  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Split help

    Hi guys, I'm trying to split this line:

    1; __utma

    where the 1 could be any other number, then theres a following pattern. I want to extract the 1st field only which is a number.

    How can I achieve this using split?

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,874
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Start by reading the documentation for the split function.

    http://perldoc.perl.org/5.10.0/functions/split.html

  • Users who have thanked FishMonger for this post:

    darkhider (12-13-2009)

  • #3
    New Coder
    Join Date
    Dec 2009
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by FishMonger View Post
    Start by reading the documentation for the split function.

    http://perldoc.perl.org/5.10.0/functions/split.html
    okay thanks. What I did was just translate all the unnecessary things to spaces.
    It works I guess so I will leave it at that.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •