![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: passing a variable value to Unix commandby pobocks (Chaplain) |
on Oct 19, 2010 at 23:38 UTC ( #866198=note: print w/replies, xml ) | Need Help?? |
I'm not able to replicate your error; however, there are a few errors/potential errors in your code (at least as written). In the array of keywords, the comma is wrong unless you mean it to be part of the pattern. "use warnings" catches this. If you're using lexical variables, $x and @a need a "my" in front of them when declared. "use strict" catches this. Here's the code with these corrections, and with strict and warnings turned on. It works on my system, but then again, so does the uncorrected code.
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
In Section
Seekers of Perl Wisdom
|
|