Hello Jeff,
Well, thanks your help.
More one thing.
When I try to run the cgi in browser come this message
Software error:
No comma allowed after filehandle at
/home/faria/public_html/cgi-bin/perl/entrada-dados.cgi
line 19.
See my below code.
print header;
print start_html("Modify Informati
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
Hello Jeff,
Other error has come:
syntax error at
home/faria/public_html/cgi-bin/perl/entrada-dados.cgi
line 19, near "print"
Execution of
/home/faria/public_html/cgi-bin/perl/entrada-dados.cgi
aborted due to compilation errors.
My all code is a below.
#!/usr/bin/perl -wt
use CGI qw(:standard)
> 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
Hello,
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 $_;
}
thanks again !
--- Jeff Pang <[EMAIL PROTECTED]> escreveu:
> >
>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
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
best regards,
Rodrigo Faria
- Original Message -
From: "J
>
>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