in reply to Re: Re: using qx{}
in thread using qx{}

You are correct in your statements about system, qx, and the backtick (`) operator. However, there is little syntactical difference between your example with qx'', and qx{}. Both are correct and will return the result of execution. The previous poster, didn't really mention system at all. (Just observing)

#!/usr/bin/perl -w @username = qw(nobody anybody); @foo = qx{ echo $username[0] }; chomp($foo[0]); print "'$foo[0]'\n"; @foo = qx{ echo \$username[0] }; chomp($foo[0]); print "'$foo[0]'\n"; @foo = qx' echo $username[0] '; chomp($foo[0]); print "'$foo[0]'\n"; # prints out #'nobody' #'[0]' #'[0]'


my @a=qw(random brilliant braindead); print $a[rand(@a)];