On Thu, 28 Mar 2002, stuart wrote:
> Hello,
> Nothing.....
That's because there's a typo. The "test" had "nlisdec" instead of
"nlisdev". You don't beed to escape the "/". In perl, like many other
languages and applications you can use any character as the delimiter for
the search and match patterns. That's what the "@" are.
> But if I type # myper.pl
> And then type # http://nlisdev.catjes.com.au/
> I get back http://172.16.0.112:8008/
As you would expect.
> I have noticed that now it the access.log, someone managed to request
> NONE://172.16.0.112:8008
They could have. Your script does nothing that would cause that.
> Should I try escaping the slashes?
No as explained above.
So, where are you at now?
> -----Original Message-----
> From: Simon White [mailto:simon@mtds.com]
> Sent: Thursday, 28 March 2002 2:01 AM
> To: squid-users@squid-cache.org
> Subject: Re: [squid-users] URL redirecting
>
>
> 27-Mar-02 at 20:54, stuart (stuart@catjes.com.au) wrote :
> > #!/usr/bin/perl
> > $|=1;
> > while (<>) {
> > s@http://nlisdev.catjes.com.au/@http://172.16.0.112:8008/@;
> > print;
> > }
>
> Looks like your PERL script. I think you will have to escape some of
> those slashes, no?
>
> What happens if you do
>
> $ echo "http://nlisdec.catjes.com.au/" | my.perl.pl
Colin
Received on Wed Mar 27 2002 - 15:36:59 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:07:08 MST