in reply to Appending characters to an existing string

so if $a=wolf, I want to appent the characters .pl, so $a now equals wolf.pl. I tried this: $a = ${a}.pl;
Why did you try that?
perl -we"$a=wolf;die $a" Unquoted string "wolf" may clash with future reserved word at -e line +1. wolf at -e line 1.
Did you ever run accross this error?

How do you declare a string in perl?

$a and ${a} both refer to the scalar $a, and that part's understandable, but what did you think .pl would do?

The period (.) is the concatination perator, and it will concatinate $a and pl.

perl -we"$a=1;$a=${a}.pl;print $a" Unquoted string "pl" may clash with future reserved word at -e line 1.
You should have seen this error before. What you're probably after is $a = "${a}.pl";

Where are you learning perl from?
Do you have a perl book?
What perl documentation have you read?

Good Advice and Maxims for Programmers


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.