[p4] perl trigger

G. Matthew Rice matt at starnix.com
Thu Nov 16 05:48:48 PST 2006


"Robert McKenna" <robertm at bioware.com> writes:
> simple trigger I've been using for testing and which fails on the line
> @FILES = `ls -l /perforce/triggers`;. The trigger succeeds if this line
> is replaced with a static assignment to @FILES. "Die" produces no output
> in the validation failure message. 
> 
> #!/usr/bin/perl
> 
> @FILES = `ls -l /perforce/triggers` || die("Bombed");

You should consider taking delaying the die and looking at the $? variable.
that's for success/failure.

The $! variable should have an error message for you to print, if there is a
failure (which it looks like there is).

The perlvar and perlop man pages have more info on these special variables
and the system/`` functions, respctively.

HTH,
-- 
g. matthew rice <matt at starnix.com>           starnix, toronto, ontario, ca
phone: 647.722.5301 x242                                  gpg id: EF9AAD20
http://www.starnix.com              professional linux services & products



More information about the perforce-user mailing list