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

Re: Re: If

by David Caughell (Monk)
on Aug 05, 2003 at 07:18 UTC ( #280906=note: print w/replies, xml ) Need Help??

in reply to Re: If
in thread If doesn't work

Hi, Mas, it was just a few months ago that I was asking such questions, so I thought I would offer a little help.

Firstly, chomp removes the newline characters from a scalar value (a string). That's not EXACTLY what it does, but it's close enough, for you, for now. (Since that's what you're probably using it for, and it will probably work.)

You can find this information by going to

Perl Functions are the easiest things to understand about Perl, with the exception of weird ones like map (it's cool, it's helpful, but it's weird, and I can't use it reliably yet). You probably want to get a good book on perl (generally speaking, one that's published by O'Reilly Leaf through a few and select one that you can understand. I'm on the second chapter of Programming Perl, and I've had to read a few sections twice, but it's a good book so far.

Something that you may find helpful (because I did, when I looked up the substr() function), is: a 1value (one-value) means the left side of the equation. So this would be an example of using the substr() function as a 1value:

substr($str,0,1) = 'D'; #set the first char of $str to 'D'

Lastly, please look up functions before you ask about them (I've made this mistake quite a few times), and ask questions like this in the chatterbox before you post a message about them.

Take care,

"For fate which has ordained that there shall be no friendship among the evil has also ordained that there shall ever be friendship among the good." - Plato / Socrates

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2019-05-23 23:14 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (147 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!