Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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

by JavaFan (Canon)
on May 02, 2012 at 09:48 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2021-01-23 20:26 GMT
Find Nodes?
    Voting Booth?