HP3000-L Archives

January 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Bartram <[log in to unmask]>
Reply To:
Date:
Thu, 14 Jan 1999 13:19:28 -0500
Content-Type:
Text/Plain
Parts/Attachments:
Text/Plain (28 lines)
 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

ATOM RSS1 RSS2