[ic] Running a system command in a perl tag?

Mike Heins mike at perusion.com
Sun Jan 20 15:10:46 UTC 2013

Quoting IC (ic at tvcables.co.uk):
> Hi folks,
> I am trying to run a system command within a perl tag but it always returns
> -1 (fail)
> The command I want to run is "csf -d xxx.xxx.xxx.xxx" where the xxx is an ip
> address, I am using (xxx being an ip address):-
> [if scratch needs_block eq "1"]
> [tmp blockstatus]
> [perl]
> my $status = system("csf -d xxx.xxx.xxx.xxx");
> return $status;
> [/perl]
> [/tmp]
> [scratch blockstatus] 
> [/if]
> There is no error in the log, it just doesn't work and returns -1

You can't run those types of things in a [perl] tag unless you have
AllowGlobal set and use [perl global=1]. It's not the kind of thing we
normally do in Interchange -- usually we put that kind of thing in a
global UserTag and use the results in a more measured fashion.

IC is not really designed to be a conduit for unbridled
system commands, though you could do it if you had AllowGlobal

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.253.4194  <mike at perusion.com>

Courage is fear holding on a minute longer.
-- General George S. Patton 

More information about the interchange-users mailing list