$Variable_B has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys, I have a problem with my experiments with the chop command. I am still a newbie like us all at perl but a extreme newbie at that. So please keep it simple. I understand the concept of chop but I am having trouble putting it into context. I am trying this and it won't work. If someone could tell me what I was doing wrong and then tell me how to fix it without giving it away I would be gratefully in debt to the mam/sir. Here is the code that won't work...yet.
#!/usr/bin/perl $a=fredd; print chop "$a"
I want this to cut the extra "d" off of the scalar $a=fredd. What am I doing wrong?
-Variable_B
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Chop" problems
by hossman (Prior) on Oct 12, 2002 at 06:06 UTC | |
by thor (Priest) on Oct 12, 2002 at 14:06 UTC | |
| |
|
Re: "Chop" problems
by hossman (Prior) on Oct 12, 2002 at 06:10 UTC | |
| |
|
Re: "Chop" problems
by Zaxo (Archbishop) on Oct 12, 2002 at 06:04 UTC | |
| |
| A reply falls below the community's threshold of quality. You may see it by logging in. |