Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Parse file, split

by LanX (Chancellor)
on May 28, 2013 at 00:15 UTC ( #1035485=note: print w/replies, xml ) Need Help??

in reply to Parse file, split

add a field limit, see split

DB<108> $line='2011 Dodge Ram Crew Cab Short Bed' => "2011 Dodge Ram Crew Cab Short Bed" DB<109> split ' ',$line,3 => (2011, "Dodge", "Ram Crew Cab Short Bed")

If this is not what you want ¹ please provide us with better data enclosed in code-tags.

You certainly have a bad delimiter character! =)

Cheers Rolf

( addicted to the Perl Programming Language)

¹) I ignore American car manufacturers and models and for me "Ram Crew Cab Short Bed" rather sound like IMDB keywords for a porn movie...


... btw: what does Cab mean? ;-)

Replies are listed 'Best First'.
Re^2: Parse file, split
by AnomalousMonk (Canon) on May 28, 2013 at 00:49 UTC
    ... what does Cab mean?

    At least in North America, the 'cab' of a Pickup truck is the driver/passenger compartment, usually enclosed. Similar to the cab of a locomotive: the operator's compartment. And yes, now you mention it, that description does sound kinda porny...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035485]
[karlgoethebier]: shmem:Ach so. Bollerwagen ist eigentlich was für Kinder. Bei uns fahren sie mit Traktoren und Feuerwehrwagen rum...
[shmem]: karlgoethebier: here abouts people are sitting in big tents, gulp beer and ingest badly scorched chicken and sausages while (not) listening to afwul musik
[shmem]: *awful
[choroba]: panem et circenses

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-05-25 12:44 GMT
Find Nodes?
    Voting Booth?