SPUG: Getting around dollar signs being removed (fwd)

David Dyck dcd at tc.fluke.com
Mon Mar 18 12:48:02 CST 2002


It appears that the variable $row[8]
is stuffed into a variable that is
passed as a quoted string $action to
system.

> { system "curl -s -o $data -d \"$action\" $mailto" }

Although it wasn't stated which OS was being used
I think that the shell is interpreting the "$"

 change this to something like
 { system "curl -s -o '$data' -d '$action' '$mailto' " }
 or probably better yet:
 { system qw(curl -s -o), $data, qw(-d), $action, $mailto }

And of course the the return code from
system should be check checked.

  perldoc -f system


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org





More information about the spug-list mailing list