Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Store and match

by vinoth.ree (Parson)
on Aug 11, 2009 at 07:26 UTC ( #787517=note: print w/ replies, xml ) Need Help??


in reply to Store and match

As prasadbabu given correct answer I believe.

As of my understand you want the last potion from the line which begins with Note. I also done this with split function.

use strict; use warnings; my $x; while($x=<DATA>){ chomp($x); if ($x =~ /^\[Note\]/){ my $find=(split(/\,/,$x))[-1] ; print "$find\n"; + + } } __DATA__ [Note]note_values,notes_values2 [Book]novels,magazines [Note]note_values,notes_values56


Comment on Re: Store and match
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-07-29 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (219 votes), past polls