Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Interpolations within system()

Reply
Thread Tools

Interpolations within system()

 
 
Brian Wakem
Guest
Posts: n/a
 
      09-26-2005
A. Sinan Unur wrote:

> I don't think so. The OP had:
>
>>> my $line="system('\"c:/Program Files/HyperSnap-DX 5/HprSnap5.exe\"
>>> -open:$file.gif -saveng $file.png')";

>
> That will *not* invoke system.



Ah yes. It is so bizarre I could not comprehend it.


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
 
Reply With Quote
 
 
 
 
Dr.Ruud
Guest
Posts: n/a
 
      09-26-2005
beartiger:

> my $foo="bar.html";
> system('ls -l $foo');



This looks more dangerous:

my $HOME = '~/test';
system('rm -fr $HOME');

--
Affijn, Ruud

"Gewoon is een tijger."


 
Reply With Quote
 
 
 
 
beartiger@gmail.com
Guest
Posts: n/a
 
      09-26-2005
Brian Wakem wrote:
<snip>
> Ah yes. It is so bizarre I could not comprehend it.


Just curious, but why can't you guys simply help rather than being
assholes and rubbing someone's nose in their stupid mistake?
Obviously, from my first post I was aware that this was *not* the way
to go about things.


J

 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      09-26-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote in news:1127736717.031508.152820
@g47g2000cwa.googlegroups.com:

> Brian Wakem wrote:
> <snip>
>> Ah yes. It is so bizarre I could not comprehend it.

>
> Just curious, but why can't you guys simply help rather than being
> assholes and rubbing someone's nose in their stupid mistake?
> Obviously, from my first post I was aware that this was *not* the way
> to go about things.


No. In your first post, you made an outrageous claim:

(E-Mail Removed) wrote in news:1127711367.389315.271310
@f14g2000cwb.googlegroups.com:

> Subject: Interpolations within system()
> From: (E-Mail Removed)
> Organization: http://groups.google.com
> Newsgroups: comp.lang.perl.misc
>
> ...are not allowed.


And you stated a "solution" to an imagined problem.

You did not ask a neutral question such as "how do I interpolate a
variable in a system call".

That said, no one has been an "a**h**e to you.

Anyway, thanks for identifying yourself.

Sinan.

PS: Before I forget, *PLONK*



--
A. Sinan Unur <(E-Mail Removed)>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
 
Reply With Quote
 
Jürgen Exner
Guest
Posts: n/a
 
      09-26-2005
(E-Mail Removed) wrote:
[...]
> my $foo="bar.html";
> system('ls -l $foo');
>
> # The var is ignored, and the whold directory is listed:


As I thought, your problem has nothing to do with system().
You are using single quotes and thereby explicitely requesting that Perl
shall use the string literally without interpolating any variable.

Have you tried double quotes?

system("ls -l $foo");

Further details see "perldoc perlop", section "Quote and Quote-like
Operators"

jue


 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      09-26-2005
(E-Mail Removed) wrote:
> Brian Wakem wrote:
>> Ah yes. It is so bizarre I could not comprehend it.

>
> Just curious, but why can't you guys simply help rather than being
> assholes and rubbing someone's nose in their stupid mistake?


Your posts showed a few misconceptions. I for one noticed efforts to
really explain what was going on, and I have severe difficulties to
understand how that would not be helpful, and make those who tried to
help "a..h...s".

Is your idea of "help" limited to a code snippet that 'works'? In that
case you have come to the wrong place.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
beartiger@gmail.com
Guest
Posts: n/a
 
      09-26-2005
Gunnar Hjalmarsson wrote:
> (E-Mail Removed) wrote:
> > Brian Wakem wrote:
> >> Ah yes. It is so bizarre I could not comprehend it.

> >
> > Just curious, but why can't you guys simply help rather than being
> > assholes and rubbing someone's nose in their stupid mistake?

>
> Your posts showed a few misconceptions. I for one noticed efforts to
> really explain what was going on, and I have severe difficulties to
> understand how that would not be helpful, and make those who tried to
> help "a..h...s".
>
> Is your idea of "help" limited to a code snippet that 'works'? In that
> case you have come to the wrong place.


Those who helped really did help, especially Juergen, and I thanked
(and thank) them.

I stand by what I said about Brian and Unur, who seemed to delight in
rubbing my nose in my mistake.

Now perhaps we can drop this issue, which really doesn't deserve
further discussion.


J

 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      09-26-2005
(E-Mail Removed) wrote:
> I stand by what I said about Brian and Unur, who seemed to delight in
> rubbing my nose in my mistake.


If that's how you perceive efforts to explain how or why incorrect
posted code is incorrect, you'd better stay out of Usenet.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dealing with nested xml within nested xml within...... Ultrus Python 3 07-09-2007 09:00 PM
GetElementbyID question - within MasterPage/contentpage - within tables Elmo Watson ASP .Net 1 05-08-2007 05:12 PM
How do I include a server tag within a javascript parameter which is itself within a HTML element event? mark4asp ASP .Net 2 11-07-2006 06:23 AM
Referring to a textbox within a web control within an aspx KatB ASP .Net 0 04-22-2005 07:14 PM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM



Advertisments