In <[log in to unmask]> [log in to unmask] writes:
> Thus it was written in the epistle of Chris Bartram,
> > I'm writing some scripts that do printer functions; one of the problems I
> > ran into is that occasionally (frequently actually) I need to execute MPE
> > commands that contain "'"s (single quotes); as in #J'12345
> >
> > Having just started with Perl (and having yet to have picked up a book on
> > it) I need to figure a way to get
> >
> > system("callci '$cicommand'");
> >
> > to work when cicommand contains a single-quote... Any help out Perl gurus?
>
> As always, there's more than one way to do it.
> 1) system("callci \"$cicommand\"");
> and
> 2) system('callci',$cicommand);
>
> are two of those ways. It appears that the POSIX shell strips single-quotes
> differently than I would have expected. The first of the above uses double
> quotes and so solves that problem. The second avoids the shell entirely and
> as such should be a better choice in terms of security and efficiency.
Many thanks!! That did the trick.
-Chris (the nospam guy) Bartram