Go Back   CP Web Hosting - reseller hosting > Server Scripting > PERL
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-2007, 04:01 AM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Default Problem with the code

I am having problem in the part of my code, here is my code:
@lines = 'ping 192.168.0.199';
foreach(@lines)
{
print;
}
It is just returning the command which I want to run ping 192.168.0.199.
Reply With Quote
  #2 (permalink)  
Old 07-06-2007, 04:05 AM
Junior Member
 
Join Date: Apr 2007
Posts: 2
Default

Well, you have used the single quotes in the second line that runs an external command. Replace those with the backquotes ("` `"). The backquote key is often found left of the number 1 on full-sized American keyboards. Be sure not to confuse the backquote with the single quote, "'".
Reply With Quote
Reply


Thread Tools
Display Modes

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

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



All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0