[28525] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9889 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 25 18:06:03 2006

Date: Wed, 25 Oct 2006 15:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 25 Oct 2006     Volume: 10 Number: 9889

Today's topics:
    Re: ActiveState Perl crashs, why ? <someone@somewhere.none>
    Re: ActiveState Perl crashs, why ? <bart.lateur@pandora.be>
        Authen::Smb and routing NerveGas@gmail.com
    Re: Authen::Smb and routing <m@remove.this.part.rtij.nl>
    Re: Automatic login to a web page <zentara@highstream.net>
    Re: Automatic login to a web page <jagjeet.malhi@gmail.com>
        binmode and <> <larry.grant.dc@gmail.com>
    Re: binmode and <> <larry.grant.dc@gmail.com>
    Re: binmode and <> <someone@example.com>
    Re: binmode and <> <rvtol+news@isolution.nl>
    Re: binmode and <> <larry.grant.dc@gmail.com>
    Re: binmode and <> <jl_post@hotmail.com>
        can someone unban me from freenode irc? #perl ? <bootiack@yahoo.com>
    Re: can someone unban me from freenode irc? #perl ? <DJStunks@gmail.com>
    Re: can someone unban me from freenode irc? #perl ? <bootiack@yahoo.com>
    Re: can someone unban me from freenode irc? #perl ? <john@castleamber.com>
    Re: can someone unban me from freenode irc? #perl ? <john@castleamber.com>
    Re: Can't find string terminator ... <softouch@softouch.on.ca>
    Re: help needed <novostik@googlemail.com>
    Re: help needed <bik.mido@tiscalinet.it>
    Re: help needed usenet@DavidFilmer.com
    Re: help needed <bik.mido@tiscalinet.it>
    Re: LWP and Javascript onclick form <benmorrow@tiscali.co.uk>
    Re: multiline <bart.lateur@pandora.be>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 25 Oct 2006 17:13:46 +0200
From: "perl" <someone@somewhere.none>
Subject: Re: ActiveState Perl crashs, why ?
Message-Id: <ehnuti$uiv$1@online.de>

> > when i run my little perl script, Perl crashes (using
Win2000+ActiveState
> > Perl 5.8.8).
> > I have no idea why.
> >
> > Here the little script:
> > ---------------------------------
> > #!/usr/bin/perl -w
> >
> > use LWP::UserAgent;
> > use strict;
> >
> > my $url = "http://www.google.de";
> > my $ua = LWP::UserAgent->new(); # create virtual browser
> > $ua->agent("someagent/v 0.1a"); # giving browser a name
> >
> > my $req = HTTP::Request->new(GET => $url);
> > my $webpage = $ua->request($req);
> >
> > if ($webpage->is_success){ print $webpage->content;}
> > else {print $webpage->status_line, "\n";}
> > -----------------------------------
> >
>
> Can't reproduce the problem. That script works fine for me using
ActiveState
> perl 5.8.8 (build 817) on Windows 2000.
>
> What exactly happens when "Perl crashes" ? Do you get any error messages ?


Thnx for your quick answer, Rob. The error message i got is the typical
popup window (translated from german):
perl.exe caused an error an will be closed. Start the program again. An
errrorprotocol is created.
Now that's really helpfull :-( . I looked where the error could be stored,
but
i have not found it.

Fortunately i solved the problem. I was quite stupid. I detected an older
version of ActiveState Perl (5.6.1) which was also installed. I simply
removed both ones and reinstalled the actual 5.8.8. Now it seems to work.

I feel ashamed :-)

Zed




------------------------------

Date: Wed, 25 Oct 2006 21:00:42 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: ActiveState Perl crashs, why ?
Message-Id: <p1kvj25t0uspjfl1rkauj9ak9qrc2g5u2g@4ax.com>

perl wrote:

>The error message i got is the typical
>popup window (translated from german):
>perl.exe caused an error an will be closed. 

Ouch. That sounds bad.

I think LWP is pure perl, otherwise I'd first think of an incompatible
DLL from a module somewhere.

Can you reproduce it, or not reproduce it, with other modules?

-- 
	Bart.


------------------------------

Date: 25 Oct 2006 10:07:19 -0700
From: NerveGas@gmail.com
Subject: Authen::Smb and routing
Message-Id: <1161796039.650239.94460@k70g2000cwa.googlegroups.com>


  I have been charged with the task of authenticating against a Samba
server, and have found that Authen::Smb does the job just fine.
However, when trying to authenticate from a different network, I get an
error code of 1.

  My first thought was that the SMB could not be routed, but have ruled
out any firewalling between the networks or on the hosts themselves.
Is it possible to authenticate through a routed network, or am I
spinning my wheels?



------------------------------

Date: Wed, 25 Oct 2006 22:19:18 +0200
From: Martijn Lievaart <m@remove.this.part.rtij.nl>
Subject: Re: Authen::Smb and routing
Message-Id: <pan.2006.10.25.20.19.18.145057@remove.this.part.rtij.nl>

On Wed, 25 Oct 2006 10:07:19 -0700, NerveGas wrote:

> 
>   I have been charged with the task of authenticating against a Samba
> server, and have found that Authen::Smb does the job just fine.
> However, when trying to authenticate from a different network, I get an
> error code of 1.
> 
>   My first thought was that the SMB could not be routed, but have ruled
> out any firewalling between the networks or on the hosts themselves.
> Is it possible to authenticate through a routed network, or am I
> spinning my wheels?

Depends. SMB can use many forms of name resolution. If it uses netbios
broadcasts, you need a WINS server to cross subnets. If it uses DNS (or
raw IPAs) it should work.

HTH,
M4
-- 
Redundancy is a great way to introduce more single points of failure.



------------------------------

Date: Wed, 25 Oct 2006 13:43:07 GMT
From: zentara <zentara@highstream.net>
Subject: Re: Automatic login to a web page
Message-Id: <maquj2toq8nktmsrakmaivhij4k6it7pam@4ax.com>

On 25 Oct 2006 00:42:15 -0700, "Jagjeet_Singh" <jagjeet.malhi@gmail.com>
wrote:

>Thanks Zentara and Brian Wilkins for your reply.
>
>This is mentioned in my isp login page "Cookies must be enabled"

Here is how to use cookies with WWW::Mechanize

#!/usr/bin/perl
use WWW::Mechanize;
my $mechanize_with_a_memory_only_cookie_jar = 
          WWW::Mechanize->new ( cookie_jar => {} );


# update: By the way, that's the same as writing 
my $mechanize_with_a_memory_only_cookie_jar = 
           WWW::Mechanize->new(); #(that's the default).
	   
#######################################################################

# You can create an in-memory cookie jar using the constructor of 
# WWW::Mechanize. Using an existing cookie jar, you can use the 
# HTTP::Cookies module. The file format this module uses is different 
# from, for example, Mozilla. You can use HTTP::Cookies::Netscape 
# or HTTP::Cookies::Explorer to read these browser-specific files.

# Using an existing file of cookies with WWW::Mechanize can be 
# done as follows:

# ...
my $agent = WWW::Mechanize->new();
my $cj = HTTP::Cookies->new(file => "/file/to/cookie_jar");
$agent->cookie_jar($cj);
# ...

# (Substitute HTTP::Cookies::Netscape or HTTP::Cookies::Explorer to 
# use a cookie file from those browsers.	   


>I ran All three examples -- Please excuse me If I was not able even to
>execute it properly
>Can't locate WWW/Mechanize.pm in @INC (@INC contains:

Go to http://search.cpan.org and search for WWW::Mechanize
Download and install it with,
perl Makefile.PL
make
make install ( as root) 


>My ISP login page can be accessed using
>"http://210.7.90.193/indexmain.php"

I couldn't access that page, the browser just kept waiting.



-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html


------------------------------

Date: 25 Oct 2006 08:36:04 -0700
From: "Jagjeet_Singh" <jagjeet.malhi@gmail.com>
Subject: Re: Automatic login to a web page
Message-Id: <1161790564.163309.243930@m73g2000cwd.googlegroups.com>

Zentara,

I have downloaded this install as per instructions given by you.

And I have copied old code + new code [ for cokies ] into one file and
execute it
and getting this error.

################################################

[root@Vicky root]# cat a.pl
#!/usr/bin/perl
use warnings;
use strict;
use WWW::Mechanize;

my $mechanize_with_a_memory_only_cookie_jar =
          WWW::Mechanize->new ( cookie_jar => {} );
my $agent = WWW::Mechanize->new();
my $cj = HTTP::Cookies->new(file => "/file/to/cookie_jar");
 $agent->cookie_jar($cj);

my $username = 'jagjeetm';
my $password = 'hello';
my $url      = 'http://210.7.90.193/indexmain.php'
my $mech     = WWW::Mechanize->new(autocheck => 1);

$mech->get( $url );
$mech->form_name("login form name");
$mech->field("username", $username);
$mech->field("password", $password);
$mech->click("login button/submit name");

$mech->content() =~ /sm.th. from Track.aspx/ and print "logged in\n"


# update: By the way, that's the same as writing
my $mechanize_with_a_memory_only_cookie_jar =
           WWW::Mechanize->new(); #(that's the default).

################################################

[root@Vicky root]# perl a.pl

syntax error at a.pl line 15, near "my "
Global symbol "$mech" requires explicit package name at a.pl line 15.
Global symbol "$mech" requires explicit package name at a.pl line 17.
Global symbol "$mech" requires explicit package name at a.pl line 18.
Global symbol "$mech" requires explicit package name at a.pl line 19.
Global symbol "$mech" requires explicit package name at a.pl line 20.
Global symbol "$mech" requires explicit package name at a.pl line 21.
Global symbol "$mech" requires explicit package name at a.pl line 23.
syntax error at a.pl line 27, near "my "
Execution of a.pl aborted due to compilation errors.


Regards,
Jagjeet Singh



------------------------------

Date: 25 Oct 2006 12:05:01 -0700
From: "Larry" <larry.grant.dc@gmail.com>
Subject: binmode and <>
Message-Id: <1161803101.655453.290130@i3g2000cwc.googlegroups.com>

Is there any way to get "while (<>)" to use binmode?  I can't figure it
out since binmode is supposed to be called after the file is already
open but before it is read for the first time, so you can't call it
before the loop, nor can you call it inside the loop.

I would also like to use binmode for 1-liners using -n or -p switches.



------------------------------

Date: 25 Oct 2006 12:17:58 -0700
From: "Larry" <larry.grant.dc@gmail.com>
Subject: Re: binmode and <>
Message-Id: <1161803878.003220.87360@f16g2000cwb.googlegroups.com>

Larry wrote:
> Is there any way to get "while (<>)" to use binmode?  I can't figure it
> out since binmode is supposed to be called after the file is already
> open but before it is read for the first time, so you can't call it
> before the loop, nor can you call it inside the loop.
>
> I would also like to use binmode for 1-liners using -n or -p switches.

P.S. ... in case anyone is wondering why I would want to use <>
together with binmode (they usually don't go together) is that I have a
 .csv file generated by Excel.  Each record is terminated by "\r\n",
however inside each record there are some "\n" characters, representing
multi-line cells in the spreadsheet.  So I want to set $/ = "\r\n" and
turn on binmode.



------------------------------

Date: Wed, 25 Oct 2006 20:02:00 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: binmode and <>
Message-Id: <YoP%g.31539$P7.13381@edtnps90>

Larry wrote:
> Is there any way to get "while (<>)" to use binmode?  I can't figure it
> out since binmode is supposed to be called after the file is already
> open but before it is read for the first time, so you can't call it
> before the loop, nor can you call it inside the loop.

use open ':raw';


> I would also like to use binmode for 1-liners using -n or -p switches.

perl -Mopen=:raw -pe'...'


perldoc open


John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


------------------------------

Date: Wed, 25 Oct 2006 22:01:03 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: binmode and <>
Message-Id: <ehomsd.ac.1@news.isolution.nl>

Larry schreef:
> Larry:

>> Is there any way to get "while (<>)" to use binmode?  I can't figure
>> it out since binmode is supposed to be called after the file is
>> already open but before it is read for the first time, so you can't
>> call it before the loop, nor can you call it inside the loop.
>> 
>> I would also like to use binmode for 1-liners using -n or -p
>> switches. 
> 
> P.S. ... in case anyone is wondering why I would want to use <>
> together with binmode (they usually don't go together) is that I have
> a .csv file generated by Excel.  Each record is terminated by "\r\n",
> however inside each record there are some "\n" characters,
> representing multi-line cells in the spreadsheet.  So I want to set
> $/ = "\r\n" and turn on binmode.

Try

  perl -MO=Deparse -ne1

and you'll find the name of the handle.

-- 
Affijn, Ruud

"Gewoon is een tijger."


------------------------------

Date: 25 Oct 2006 13:27:51 -0700
From: "Larry" <larry.grant.dc@gmail.com>
Subject: Re: binmode and <>
Message-Id: <1161808071.658871.33870@m73g2000cwd.googlegroups.com>


Dr.Ruud wrote:
> Larry schreef:
> > Larry:
>
> >> Is there any way to get "while (<>)" to use binmode?  I can't figure
> >> it out since binmode is supposed to be called after the file is
> >> already open but before it is read for the first time, so you can't
> >> call it before the loop, nor can you call it inside the loop.
> >>
> >> I would also like to use binmode for 1-liners using -n or -p
> >> switches.
> >
> > P.S. ... in case anyone is wondering why I would want to use <>
> > together with binmode (they usually don't go together) is that I have
> > a .csv file generated by Excel.  Each record is terminated by "\r\n",
> > however inside each record there are some "\n" characters,
> > representing multi-line cells in the spreadsheet.  So I want to set
> > $/ = "\r\n" and turn on binmode.
>
> Try
>
>   perl -MO=Deparse -ne1
>
> and you'll find the name of the handle.
>

I know the handle is ARGV, but knowing the name won't help.  The handle
won't be open before the "while" loop so I can't "bindmode" it then.
Inside the "while" loop, it will already be too late to call "binmode",
since the line has already been read.



------------------------------

Date: 25 Oct 2006 13:42:53 -0700
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: binmode and <>
Message-Id: <1161808973.158789.189780@h48g2000cwc.googlegroups.com>

Larry wrote:
>
> Is there any way to get "while (<>)" to use binmode?  I can't figure it
> out since binmode is supposed to be called after the file is already
> open but before it is read for the first time, so you can't call it
> before the loop, nor can you call it inside the loop.
>
> I would also like to use binmode for 1-liners using -n or -p switches.


Dear Larry,

   A similar thread can be found at:

http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/9ce7a7975de28559/aec888a9d829c0d7?&hl=en#aec888a9d829c0d7

   Basically, it says that you can use the '-Mopen=IO,:raw' switch to
force your open() statements to open in binmode().

   You can even use this with -n and -p switches.  For example, if you
wanted to print out the number of bytes in every line of a file
'file.txt', you might write this:

      perl -Mopen=IO,:raw -ne "print length" file.txt

(and it will report blank lines with DOS-line endings as having two
bytes, instead of just one.)

   Oddly enough, the "perldoc open" documentation says that you can use
":bytes" instead of ":raw" for binary mode, but I haven't gotten that
to work (that is, it behaves exactly like I didn't use the
'-Mopen=IO,:bytes' switch at all).  So either the documentation's
wrong, or there's a bug in my version of ActiveState Perl, or I'm not
doing something right.

   Either way, I hope this helps, Larry.

   -- Jean-Luc



------------------------------

Date: 25 Oct 2006 11:48:18 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: can someone unban me from freenode irc? #perl ?
Message-Id: <1161802098.559084.123840@k70g2000cwa.googlegroups.com>

This stinks I got banned somehow.



------------------------------

Date: 25 Oct 2006 11:50:26 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: can someone unban me from freenode irc? #perl ?
Message-Id: <1161802226.616850.132580@k70g2000cwa.googlegroups.com>


gavino wrote:
> This stinks I got banned somehow.

hahahahahahaha

-jp



------------------------------

Date: 25 Oct 2006 14:37:00 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: Re: can someone unban me from freenode irc? #perl ?
Message-Id: <1161812220.761094.87260@b28g2000cwb.googlegroups.com>

ok this sucks lol
damn it jim!
ok
15 naked virgins for whoever lets me back in



------------------------------

Date: 25 Oct 2006 21:53:44 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: can someone unban me from freenode irc? #perl ?
Message-Id: <Xns9867ABDE871D4castleamber@130.133.1.4>

"gavino" <bootiack@yahoo.com> wrote:

> ok this sucks lol
> damn it jim!
> ok
> 15 naked virgins for whoever lets me back in

This is a Perl group, payments should be made in camels only (either with 
one or two humps).

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


------------------------------

Date: 25 Oct 2006 21:54:39 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: can someone unban me from freenode irc? #perl ?
Message-Id: <Xns9867AC0664579castleamber@130.133.1.4>

John Bokma <john@castleamber.com> wrote:

> "gavino" <bootiack@yahoo.com> wrote:
> 
>> ok this sucks lol
>> damn it jim!
>> ok
>> 15 naked virgins for whoever lets me back in
> 
> This is a Perl group, payments should be made in camels only (either
> with one or two humps).

No wonder they kicked you out, sheesh!

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


------------------------------

Date: Wed, 25 Oct 2006 10:15:48 -0400
From: Amer Neely <softouch@softouch.on.ca>
Subject: Re: Can't find string terminator ...
Message-Id: <dkK%g.173066$sS1.90427@read1.cgocable.net>

Solipsis wrote:
> Trudge,
> 
> 
> Silly question.  Is this happening after you ftp the files to the *nix
> box? Or before?
> 

It was only happening on my local Windows machine. I tested that option 
and they work fine on the remote server.

-- 
Amer Neely
w: www.softouch.on.ca/
b: www.softouch.on.ca/blog/
Perl | MySQL programming for all data entry forms.
"We make web sites work!"


------------------------------

Date: 25 Oct 2006 10:25:07 -0700
From: "novostik@googlemail.com" <novostik@googlemail.com>
Subject: Re: help needed
Message-Id: <1161797107.198503.121440@b28g2000cwb.googlegroups.com>

Sorry guys,
as i told u i am new to perl , i must have missed those
columns.....thanks for the links David.But aren't there any tutorials
abt these...i needed a bit of elaboration.

Tad McClellan wrote:
> novostik@googlemail.com <novostik@googlemail.com> wrote:
>
> > Subject: help needed
>
>
> Subject needed.
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas



------------------------------

Date: 25 Oct 2006 20:41:23 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: help needed
Message-Id: <3ibvj29ljdpaj1cn2mv2jmv7lmkmfi6boa@4ax.com>

On 25 Oct 2006 10:25:07 -0700, "novostik@googlemail.com"
<novostik@googlemail.com> wrote:

(Slightly edited for clarity)

>> > Subject: help needed
>>
>> Subject needed.

>Sorry guys,
>as i told u i am new to perl , i must have missed those

Are you new to English as well? How 'bout some proper capitalization?
How 'bout not using this... l33t talk? And the post you're replying to
is not about your being new to Perl. It's about putting the subject of
one's post in the Subject.

>columns.....thanks for the links David.But aren't there any tutorials

Which columns? Who is David? (I know but) you're replying to Tad,
aren't you?

>abt these...i needed a bit of elaboration.

And the question is? I have a vague idea of you having some trouble
reading the documentation of the modules you're interested in using.
If so, then you should point out *which* difficulties you're actually
having...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: 25 Oct 2006 13:24:29 -0700
From: usenet@DavidFilmer.com
Subject: Re: help needed
Message-Id: <1161807869.316958.54960@e3g2000cwe.googlegroups.com>

Michele Dondi wrote:
> And also wrong capitalization, BTW.

Yeah, but http://search.cpan.org isn't case sensitive, so that wouldn't
cause the OP to not be able to find the relevant perldocs.  Of course,
it would cause perl to not find the module ;-)

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



------------------------------

Date: 26 Oct 2006 00:03:03 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: help needed
Message-Id: <annvj253b23ccfjceejh8fb793lta3lkt4@4ax.com>

On 25 Oct 2006 13:24:29 -0700, usenet@DavidFilmer.com wrote:

>> And also wrong capitalization, BTW.
>
>Yeah, but http://search.cpan.org isn't case sensitive, so that wouldn't
>cause the OP to not be able to find the relevant perldocs.  Of course,
>it would cause perl to not find the module ;-)

That's why it was BTW!  ;-)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Wed, 25 Oct 2006 00:25:47 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: LWP and Javascript onclick form
Message-Id: <slrnejt87r.cc1.benmorrow@mauzo.dyndns.org>

[please don't quote signatures]

On 2006-10-24, garhone <cacheung@consumercontact.com> wrote:
> David Dorward wrote:
>> garhone wrote:
>>
>> > <input type="button" value="Submit" onClick="submitCheck()"
>>
>> > The error I get is "No clickable input with name SUBMIT"
>> > My knowledge of javascript is minimal. Can someone direct me to how to
>> > use LWP to submit data to this form?
>>
>> You'd need to dig through the source code of the JS and recreate it in Perl.
>>
>> You might be better off with one of the modules that mechanise Mozilla or
>> Internet Explorer as they can handle JS.
>
> Okay, I went to look at what the submitCheck function is doing. It
> looks like it is validating all the data in the input fields, then it
> when the data passes all the checks, it "makes available" another
> hidden submit button, and it calls a submit function itself.
>
> The javascript looks like
> document.getElementById('submit1').innerHTML='<input type="hidden"
> name="SUBMIT" value="SUBMIT">';
> document.getElementById('thefrom').submit();
>
> I'm not really sure how to recreate this in Perl. Can anyone give me
> any ideas?

You need to construct an appropriate GET or POST request and send it to
the server yourself. To do so you need to look at the form as it would
exist at the time the .submit method is called in JS, and construct the
request the browser would construct from the data in the form.

You may get some mileage out of the web-scraping proxy
http://www.google.com/search?q=web+scraping+proxy&btnI=I
 . If you run through a session in your browser, you should be able to
take the resulting code and replace the data you used with the data you
want to submit.

Ben

-- 
Raise your hand if you're invulnerable.
                                                  [benmorrow@tiscali.co.uk]


------------------------------

Date: Wed, 25 Oct 2006 21:09:49 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: multiline
Message-Id: <u6kvj25dm43ijkvmjuob5794qs570i9vim@4ax.com>

hawk.alan@gmail.com wrote:

>It does mean I'm gonna have to change the rest of my script to
>accommadate for slurping(ie. $/="").

Or you could try to use the "range" (aka "flipflop") operator, either 2
or 3 dots. Like this:

	while(<FILE>){
	  if (my $cnt = (/falls mainly on/ ... /l/)){ print "$cnt ";};
	  print;
	}

It'll match the first part of the pattern and continue until it either
matches the second pattern, or until it reaches the end of the file. So
after the start it'll never fail. You may want to postpone any action
until you're sure the second pattern will match, and meanwhile, buffer
the lines somewhere.

Also be aware that the flipflop won't be switched off at the end of the
file, which means it'll still be on when you read a new file. If that
matters, a reasonable behaviour could be worked out using eof.
-- 
	Bart.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9889
***************************************


home help back first fref pref prev next nref lref last post