Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: If

by David Caughell (Monk)
on Aug 05, 2003 at 07:18 UTC ( [id://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 http://www.perldoc.com/perl5.6/pod/perlfunc.html.

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 http://perl.oreilly.com/). 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,
Dave.

"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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-24 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found