in reply to passing variables

As someone has no doubt already pointed out, the single quote doesn't do variable interpolation. You probably want

system ("tremove @host:$ep"); # WRONG -- should be \@host
instead.

Update: Sorry, as has been pointed out -- the '@' should be escaped with a leading '\'. That'll teach me to post something, then wander off to continue my work day.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^2: passing variables
by davido (Cardinal) on Jan 09, 2006 at 17:07 UTC

    system ("tremove @host:$ep");

    That solves one problem by creating another. You've solved the problem of $ep not interpolating, but you've created the problem of @host interpolating, when the OP stated it's not intended to be a variable.

    You could use either of the following techniques:

    system( 'tremove @host:' . $ep ); system( "tremove \@host:$ep" );

    Dave

Re^2: passing variables
by diotalevi (Canon) on Jan 09, 2006 at 17:06 UTC

    You meant to escape the @ as \@ but didn't.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊