Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Understanding Split and Join

by phamalda (Novice)
on Jan 29, 2016 at 19:18 UTC ( [id://1154016]=note: print w/replies, xml ) Need Help??


in reply to Understanding Split and Join

First and foremost, thank you guys for the unending information. Great stuff! I am working on a script that splits a line into an array delimited by tildes. I need to completely remove a couple of those resulting fields if there is a way to do that. This is rather than removing them based on the regular expressions identified. Below is the piece of code that does that:

my @field = split("~", $line); if ($field[11] eq '000015') { $line =~ s/$field[12]/92/g; $line =~ s/~~~~~~~~~10~/~10~/g; push(@newlines,$line); }

I'd really appreciate your advice on this. Thanks in advance.

Replies are listed 'Best First'.
Re^2: Understanding Split and Join
by stevieb (Canon) on Jan 29, 2016 at 21:44 UTC
    Welcome to the Monastery, phamalda!

    Could you please repost this in Seekers of Perl Wisdom? I understand why you asked this here, but you'll get a wider audience if you post the question in the proper location.

    Thanks!
      Okay, thank you so much. I appreciate it. Sorry about that. Pham
        No worries. Glad you're here, and thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1154016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-19 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found