Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regex Split and Formatting

by ww (Bishop)
on Apr 04, 2013 at 15:56 UTC ( #1027007=note: print w/ replies, xml ) Need Help??


in reply to Regex Split and Formatting

If the first record -- in fact -- is the same as the first record -- as posted -- how do you transform it to the sample output you offer. IOW, how does:

"123", "DEF123","this is test","C:\Abhinav\test.jpg"</i>" # Abhinav

become:

"1. "123", "DEF123","this is test","C:\Matt\test.jpg" # Matt???

Were you merely careless about posting your request for a way to resolve your problem. Carelessness like that often wastes the time of those good enough to try to help you!

And, not just BTW, I'm not persuaded by your claim that this is not homework. I'm not sure it is, either, but the 'no modules' statement -- in the face of advise (to use a CSV approach) from those far wiser about Perl than thee -- is pretty hard to accept as anything other than nonsense.

Also note: your comment in Re: Regex Split and Formatting that you "failed miserably" is not a precise statement of a problem... other than failure to persevere in the face of discouragement. The code accompanying that generality might serve to offer you some enlightenment, however, were you to add a few strategic print statements to see what you're really getting into $line and $first.


If you didn't program your executable by toggling in binary, it wasn't really programming!


Comment on Re: Regex Split and Formatting
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-12-21 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls