Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Regex Split and Formatting

by ww (Archbishop)
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


"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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027007]
[choroba]: (well, it comes from the 14th century, so labelling it as "modern" doesn't seem appropriate)
[Your Mother]: "They" is becoming accepted but it irritates me sometimes. I tend to just pick she or he randomly or try to use "one."
LanX thinks it is appropriate here :)
[Your Mother]: They would think so.
[jdporter]: ok, I need a recipe for piping lines "through" an external program which is itself a filter
[jdporter]: without using a tmp file
[1nickt]: tobyink perl -MTypes::Standard= is_Int -Mstrict -wE 'say 1 if is_Int 1.0'
[jdporter]: so that I can use the existing expand unix util. Otherwise, I'll probably use Text::Tabs.
[1nickt]: pryrt I guess I don;t really care if user 42 logs on as 42.0 ... more of an academic question at this point.
[LanX]: jdporter: open PIPE,'-|' ?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2017-05-24 20:24 GMT
Find Nodes?
    Voting Booth?