Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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


Comment on Re^5: Can't get the desired output..
Select or Download Code
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
Node Status?
node history
Node Type: note [id://968414]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-12-19 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (71 votes), past polls