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

Frank Reitzenstein frank at aussievitamin.com
Sun Jan 20 15:35:07 UTC 2013

Mike Heins wrote:
> 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
> set.
Thanks for that Mike.

More information about the interchange-users mailing list