Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: Example Inp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1381 of 1478
Post > Topic >>

Re: Example Input Datas

by digolinopage@[EMAIL PROTECTED] (Rodrigo Tavares) Mar 9, 2007 at 10:33 AM

Hello Jeff,

I believe my english is very bad. 
Bush is in Brazil, I'll go pratice my english with him
:) 

In true, I desire the dest_ip will be informed by
user, using a HTML file. Still, i don't say the value.
The user will define this value in textbox of HTML.

Thanks !

Rodrigo Faria 

>
>>
>>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 is the meta-characters.becase '.' is a
meta-character in
> Perl,so given this case:
>
> $source_ip = '192.168.1.1';
> $dest_ip = '10.0.0.1';
> s/$source_ip/$dest_ip/g;
>
> maybe meet some problems.
> The better way is use \Q for disable quote
meta-characters.like:
>
> s/\Q$source_ip/$dest_ip/g;
>
> From perldoc perlre:
>
>           \E          end case modification (think
vi)
>           \Q          quote (disable) pattern
metacharacters till \E
>
> Hope this useful.

__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/
 




 1 Posts in Topic:
Re: Example Input Datas
digolinopage@[EMAIL PROTE  2007-03-09 10:33:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 12:51:43 CDT 2008.