perl/alarm program question
Posted in 2000
Topics: General Discussion
Hey All! I am trying to construct an alarm program in Perl to use with Informix, the problem is some of the parameters that are passed from the engine are messages with spaces in them. ARGV interprets them as separate arguments because of the spaces. How can I read these intact. I saw an example of an alarm program on the Informix site but it iused the ARGV without modification. Could this work?? Please reply also to kevin_burdish@timeinc.com Thanks!!! Kevin
>Subject: perl/alarm program question >From: "Kevin" kevin_burdish@timeinc.com >Date: 10.03.00 18:03 W. Europe Standard Time >Message-id: <38c92b5b$0$14577@wodc7nh7.news.uu.net> > >Hey All! >I am trying to construct an alarm program in Perl to use with Informix, >the problem is some of the parameters that are passed from the engine are >messages with spaces in them. ARGV interprets them as separate arguments >because of the spaces. How can I read these intact. I saw an example of an >alarm program on the Informix site but it >iused the ARGV without modification. Could this work?? >Please reply also to kevin_burdish@timeinc.com >Thanks!!! >Kevin > just quote the message
Kevin Burdish wrote: > I am trying to construct an alarm program in Perl to use with Informix, > the problem is some of the parameters that are passed from the engine are > messages with spaces in them. ARGV interprets them as separate arguments > because of the spaces. How can I read these intact. I saw an example of an > alarm program on the Informix site but it > used the ARGV without modification. Could this work?? Where are you running the Perl script? In an alarm shell script, or is the server running the Perl script directly? I strongly suspect you are using a shell script such as: perl $SOMEDIR/perlscript $* Replace the $* with "$@" (yes, the double quotes are required, as is the change from * to @). Using "$*" will break in a different way. If this is not the case, then you've got some fancy explaining to do, probably most easily done by showing the entry from $ONCONFIG and the Perl script. Perl handles spaces in arguments correctly. Period. That's why I suspect that you've got a shell script problem. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN #include <disclaimer.h>