On Mon, Aug 25, 2008 at 2:06 AM, Lars Haugseth <[EMAIL PROTECTED]> wrote:
>
> Another solution, which is not really what the OP was asking about, but
> probably fixes his problem, is to ensure that each request from the same
> client will always be sent to the same webserver (based on a hashing of
xit;
}
&exit;
But this won't:
use strict;
use warnings;
sub exit {
print "test exit";
exit;
}
die;
Glad to hear any words from you.
--
Jeff Pang <[EMAIL PROTECTED]>
http://home.arcor.de/jeffpang/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
>
>my $timeworked = {};
Hello,
This defined a hash reference.
See: perldoc perlref
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
>
>Hi Jeff,
>
>This IP 192.168.1.1 will replaced by IP defined from user.
>
>example:
>
>Enter with IP : 10.0.0.1
>Submit
>
>When somebody to type one value, it will replaced the file value.
>
>IP: 192.168.1.1 -> will be replaced -> 10.0.0.1
>
Got it.Then your script is may right.
The only note
>Now it's change the file.
>Very funny :)
>
>if I want the user type one IP.
>I saw the example guestbook.cgi.
>
>Perhaps still :
>
>
>my $ip;
>print IP "To: $ip\n";
>for (@file)
> {
>s/192.168.1.85/$ip/g;
> print FILE $_;
> }
>
What would you like to say?
--
http://home.arcor.de/jef
> s/192.168.1.85/10.0.0.1/g
> print FILE $_;
hello,
Here the first line you lost a ';' at the end.
The whole script I've tested fine as below:
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
print header;
print start_html("Modify Information");
my $f
print FILE,$_;
Here comma is not needed.
change to:
print FILE $_;
Also I'd suggest you always add the "use strict" at the begin of your cgi
scripts.
-Original Message-
>From: Rodrigo Tavares <[EMAIL PROTECTED]>
>Sent: Mar 8, 2007 8:04 PM
>To: beginners-cgi@perl.org
>Subject: Re: Examp
>I'm beginner in Perl with CGI.
>I create a two input box;
>
>In the first input box, I'll put the ip adress.
>In the second input box I'll put the port
>
>Then when i click em submit, the cgi must make:
>
>perl -pi -e 's/192.168.1.1/10.0.0.1/g' /opt/myfile
>
>How I can to do it ?
>
At first you