Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: Can't get the desired output..

by JavaFan (Canon)
on May 02, 2012 at 09:48 UTC ( [id://968414]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Can't get the desired output..
in thread Can't get the desired output..

If you want to print out "Cobray" if the string contains "Cobray", then why don't you just do that? Change your print "$name" to print "Cobray".

Replies are listed 'Best First'.
Re^6: Can't get the desired output..
by astronogun (Sexton) on May 02, 2012 at 10:19 UTC

    yes, that was the lasting in my mind to do.. if I do this then "what's the point of learning line 7" for what I've read in a tutorial it will output that name (for sure) and as an add up to my knowledge it does print the whole thing as long as there is the name "Cobray" on it. Actually to tell you all I didn't know that it will turned out like this what I'm thinking is that if the code runs it will just output name "Cobray" So sorry for being such a noob.. That's why Im running this test for better understanding..

    What im after is how can I print that name without changing the input file.. For what I see the only solution is using either split or grep.. Is there other way if i dont want to use those.. thanks sir JavaFan,GrandFather and davido :)

Log In?
Username:
Password:

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

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

    No recent polls found