$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
Back to
Seekers of Perl Wisdom