[28644] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 10008 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 26 03:05:47 2006

Date: Sun, 26 Nov 2006 00:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 26 Nov 2006     Volume: 10 Number: 10008

Today's topics:
    Re: a short non-working Perl script <mritty@gmail.com>
    Re: a short non-working Perl script <noreply@gunnar.cc>
        I use TK to show some chinese web page, I get nothing,w quakewang@mail.whut.edu.cn
        my <awk@hotmail.com>
    Re: my <cperry@hmdc.harvard.edu>
    Re: my <someone@example.com>
        new CPAN modules on Sun Nov 26 2006 (Randal Schwartz)
    Re: Perl and Online Banking usenet@DavidFilmer.com
    Re: Perl and Online Banking <bradbrockman@yahoo.com>
    Re: Perl and Online Banking <tadmc@augustmail.com>
    Re: prevent further hash auto-vivification <uri@stemsystems.com>
    Re: print_r() <john@castleamber.com>
    Re: print_r() <uri@stemsystems.com>
    Re: Regex exactly 0, 1 or 2 matches, {0,2} not working <stan@invalid.blz/hmrprint/com.com>
    Re: the opposite of 'chop' <mritty@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 25 Nov 2006 18:09:43 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: a short non-working Perl script
Message-Id: <1164506983.574740.32580@j44g2000cwa.googlegroups.com>

Mark Tarver wrote:
> >   PL> Are you *reading* any of these replies?  You were given the correct way
> >   PL> to do this by several different people.
>
> But for my own education I would still like to know the answer to my
> question as to how $buffer can read the output of series of forms.

Un-f***ing-believable.  Your question was answered at least 4 times, at
least one of those times by me.  You're using read() wrong.  I
explained to you exactly how you were using it wrong.  When you assign
$buffer to the return value of read(), you overwrite the correct
contents of $buffer with an integer.  That's why your script was wrong.
 How many more times would you like me to tell you that?

> cgi.pm is actually not part of Perl itself, but a package on top of
> Perl.

This is pure nonsense.  CGI.pm (there is no cgi.pm, despite what a
certain regular here would apparently like you to believe by his
refusal to use the shift key) is part of the core distrobution.  It is
as much Perl as anything else.

> The original program works apart from this one line.  Here is an
> example where $buffer is set to a string.

Yes, and your example DIDN'T DO THAT.  Because you were NOT USING
read() CORRECTLY.  That's three time's I've explained it.  Would you
like one more?

> You don't have to answer the question, but the correct answer in Perl
> should not be too long.

Screw you.  We did answer it.  Repeatedly.  Your inability to read is
now your own problem.

*plonk*

Paul Lalli



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

Date: Sun, 26 Nov 2006 06:05:22 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: a short non-working Perl script
Message-Id: <4sslkkF11bhneU1@mid.individual.net>

Paul Lalli wrote:
> Mark Tarver wrote:
>>for my own education I would still like to know the answer to my
>>question as to how $buffer can read the output of series of forms.
> 
> Un-f***ing-believable.  Your question was answered at least 4 times,

Then I have a problem with the maths. Which 4 posts explain that the 
STDIN contents in $buffer is replaced by the return value from read()?

> at least one of those times by me.

Where?

> Screw you.  We did answer it.  Repeatedly.  Your inability to read is
> now your own problem.

What about ability to count? ;-)

> *plonk*

That's your own business.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: 25 Nov 2006 18:00:20 -0800
From: quakewang@mail.whut.edu.cn
Subject: I use TK to show some chinese web page, I get nothing,why?
Message-Id: <1164506420.687013.127370@n67g2000cwd.googlegroups.com>

      In the following problem, I use TK to get a page and show it, but

I get nothing when I use it on a chinese web page, and it can get some
thing for a english based web page, why?

      I think it may the the "FONT" problem, but I do not not how to
special a chinese font.

       I do not know how to spell a font name,  xxxxx-bold-12, what is
the
xxxxx and I have a font file, how to know what is the font name shall I

use to load it?


thanks.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D



#!/usr/bin/perl

use Tk;
require LWP::UserAgent;
use HTML::Parse;

%html_action =3D
(
	"</TITLE>", \&end_title,
	"<H1>",     \&start_heading,
	"</h2>",    \&end_heading,
	"<H2>",     \&start_heading,
	"</H2>",    \&end_heading,
	"<H3>",     \&start_heading,
	"</H3>",    \&end_heading,
	"<H4>",     \&start_heading,
	"</H4>",    \&end_heading,
	"<H5>",     \&start_heading,
	"</H5>",    \&end_heading,
	"<H6>",     \&start_heading,
	"</H6>",    \&end_heading,
	"<P>",      \&paragraph,
	"<BR>",     \&line_break,
	"<HR>",     \&draw_line,
	"<A>",      \&flush_text,
	"</A>",     \&end_link,
	"</BODY>",  \&line_break,
);

$ua =3D new LWP::UserAgent;
#$dictionary_url =3D "http://dict.cn/search/";
#$dictionary_url =3D "http://www.perl.com/";
$dictionary_url =3D "http://www.baidu.com/";
#$dictionary_url =3D
"http://www.oreilly.com/openbook/webclient/ch07.html";


$mw =3D MainWindow->new;
$mw->title("xword");
$mw->CmdLine;

$frame1 =3D $mw->Frame(-borderwidth =3D> 2, -relief =3D> 'ridge');
$frame1->pack(-side =3D> 'top', -expand =3D> 'no', -fill =3D> "x");
$frame2 =3D $mw->Frame;
$frame2->pack(-side =3D> 'top', -expand =3D> 'yes', -fill =3D> 'both');
$frame3 =3D $mw->Frame;
$frame3->pack(-side =3D> 'top', -expand =3D> 'no', -fill =3D> 'x');

$frame1->Label(-text =3D> "Enter Word: ")->pack(-side =3D> "left", -anchor
=3D> "w");
$entry =3D $frame1->Entry(-textvariable =3D> \$word, -width =3D> 40);
$entry->pack(-side =3D> "left", -anchor =3D> "w", -fill =3D> "x", -expand =
=3D>
"y");

$bttn =3D $frame1->Button(-text =3D> "Lookup", -command =3D> sub {
&do_search(); });
$bttn->pack(-side =3D> "left", -anchor =3D> "w");

$entry->bind('<Return>', sub { &do_search(); } );

$scroll =3D $frame2->Scrollbar;
$text =3D $frame2->Text(-yscrollcommand =3D> ['set', $scroll],
							-wrap =3D> 'word',
							-font =3D> '=CB=CE=CC=E5-bold-24',
							-state =3D> 'disabled');
$scroll->configure(-command =3D> ['yview', $text]);
$scroll->pack(-side =3D> 'right', -expand =3D> 'no', -fill =3D> 'y');
$text->pack(-side =3D> 'left', -anchor =3D> 'w',
							-expand =3D> 'yes', -fill =3D> 'both');

$frame3->Label(-textvariable =3D> \$INFORMATION,
							-justify =3D> 'left')->pack(-side =3D> 'left',
							-expand =3D> 'no',
							-fill =3D> 'x');
$frame3->Button(-text =3D> "Exit",
							-command =3D> sub{exit} )->pack(-side =3D> 'right',
							-anchor =3D> 'e');


$text->tag('configure', '</h2>', -font =3D> '=CB=CE=CC=E5-bold-24');
$text->tag('configure', '</H2>', -font =3D> '=CB=CE=CC=E5-bold-18');
$text->tag('configure', '</H3>', -font =3D> '=CB=CE=CC=E5-bold-14');
$text->tag('configure', '</H4>', -font =3D> '=CB=CE=CC=E5-bold-12');
$text->tag('configure', '</H5>', -font =3D> '=CB=CE=CC=E5-bold-12');
$text->tag('configure', '</H6>', -font =3D> '=CB=CE=CC=E5-bold-12');


$entry->focus;
MainLoop;


sub do_search {
	my ($url) =3D @_;

	return if ($word =3D~ /^\s*$/);

	$url =3D "$dictionary_url?q=3D$word" if (! defined $url);
	#$text->insert('end', "\n--------------------------------------\n");



	$INFORMATION =3D "Connect: $url";

	$text->configure(-cursor=3D> 'watch');
	$mw->idletasks;

	my $request =3D new HTTP::Request('GET', $url);

	my $response =3D $ua->request($request);
	if ($response->is_error) {
		$INFORMATION =3D "ERROR: Could not retrieve $url";
	} elsif ($response->is_success) {
		my $html =3D parse_html($response->decoded_content);

		## Clear out text item
		$text->configure(-state =3D> "normal");

		$text->delete('1.0', 'end');
		$html->traverse(\&display_html);
		$text->configure(-state =3D> "disabled");
		$html_text =3D "";
		$INFORMATION =3D "Done";
	}

	$text->configure(-cursor =3D> 'top_left_arrow');
}


sub display_html {
	my ($node, $startflag, $depth) =3D @_;
	my ($tag, $type, $coderef);  ## This tag is the HTML tag...

	if (!ref $node) {
		$html_text .=3D $node;
	} else {
		if ($startflag) {
			$tag =3D $node->starttag;
		} else {
			$tag =3D $node->endtag;
		}

		## Gets rid of any 'extra' stuff in the tag, and saves it
		if ($tag =3D~ /^(<\w+)\s(.*)>/) {
			$tag =3D "$1>";
			$extra =3D $2;
		}

		if (exists $html_action{$tag}) {
			$html_text =3D~ s/\s+/ /g;
			&{ $html_action{$tag} }($tag, $html_text);
			$html_text =3D "";
		}
	}
	1;
}




sub end_title {
	$mw->title("xword: ". $_[1]);
}


sub start_heading {
	&flush_text(@_);
	$text->insert('end', "\n\n");
}

sub end_heading {
	$text->insert('end', $_[1], $_[0]);
	$text->insert('end', "\n");
}

sub paragraph {
	&flush_text(@_);
	$text->insert('end', "\n\n");
}

sub line_break {
	&flush_text(@_);
	$text->insert('end', "\n");
}

sub draw_line {
	&flush_text(@_);
	$text->insert('end', "\n--------------------------------------\n");
}

sub flush_text {
	$text->insert('end', $_[1]);
}

sub end_link {
	## Don't want to add links to mailto refs.
	if ($extra =3D~ /HREF\s*=3D\s*"(.+)"/ && $extra !~ /mailto/) {
		my $site =3D $1;

		## The tags must have unique names to allow for a different
		## binding to each one. (Otherwise we'd just be changing that same
		## tag binding over and over again.)

		my $newtag =3D "LINK". $cnt++;

		$text->tag('configure', $newtag, -underline =3D> 'true',
							-foreground =3D> 'blue');
		$text->tag('bind', $newtag, '<Enter>',
		sub { $text->configure(-cursor =3D> 'hand2');
		$INFORMATION =3D $site; });
		$text->tag('bind', $newtag, '<Leave>',
		sub { $text->configure(-cursor =3D> 'top_left_arrow');
		$INFORMATION =3D "";});

		$text->tag('bind', $newtag, '<ButtonPress>',
		sub { &do_search($site); });

		$text->insert('end', $_[1], $newtag);
	} else {
		&flush_text(@_);
	}
}



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

Date: Sun, 26 Nov 2006 01:44:32 +0100
From: Awkish <awk@hotmail.com>
Subject: my
Message-Id: <4568e370$0$30037$ba620e4c@news.skynet.be>

Hello,
I'm a bit puzzled by the following behavior:

VARIANT 1:
===========
perl -e '
my $var=0; 
sub fonc{
   $var++; 
   printf "sub: $var\n";
} 
$var=5;
my @arr=( 10,20,30 ); 
for $var (@arr){
   printf "main: $var\n";
   fonc();} 
'

This gives:
main: 10
sub: 6
main: 20
sub: 7
main: 30
sub: 8


VARIANT 2:
===========
perl -e '
sub fonc{
   $var++; 
   printf "$var\n";
}
$var=5;
my @arr=( 10,20,30 ); 
for $var (@arr){
   printf "main: $var\n";
   fonc();
} 
'

This gives:
main: 10
11
main: 20
21
main: 30
31


Strange! What is the effect of "my"? 



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

Date: 25 Nov 2006 18:07:15 -0800
From: "cperry" <cperry@hmdc.harvard.edu>
Subject: Re: my
Message-Id: <1164506835.471809.231040@l12g2000cwl.googlegroups.com>

This is more of a scope issue I think
Since sub{} and my() were created at the same scope, my $var is
accessible within


Awkish wrote:
> Hello,
> I'm a bit puzzled by the following behavior:
>
> VARIANT 1:
> ===========
> perl -e '
> my $var=0;
> sub fonc{
>    $var++;
>    printf "sub: $var\n";
> }
> $var=5;
> my @arr=( 10,20,30 );
> for $var (@arr){
>    printf "main: $var\n";
>    fonc();}
> '
>
> This gives:
> main: 10
> sub: 6
> main: 20
> sub: 7
> main: 30
> sub: 8
>
>
> VARIANT 2:
> ===========
> perl -e '
> sub fonc{
>    $var++;
>    printf "$var\n";
> }
> $var=5;
> my @arr=( 10,20,30 );
> for $var (@arr){
>    printf "main: $var\n";
>    fonc();
> }
> '
>
> This gives:
> main: 10
> 11
> main: 20
> 21
> main: 30
> 31
> 
> 
> Strange! What is the effect of "my"?



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

Date: Sun, 26 Nov 2006 03:35:22 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: my
Message-Id: <_X7ah.10758$p9.3490@edtnps82>

Awkish wrote:
> Hello,
> I'm a bit puzzled by the following behavior:
> 
> VARIANT 1:
> ===========
> perl -e '
> my $var=0; 
> sub fonc{
>    $var++; 
>    printf "sub: $var\n";
> } 
> $var=5;
> my @arr=( 10,20,30 ); 
> for $var (@arr){
>    printf "main: $var\n";
>    fonc();} 
> '
> 
> This gives:
> main: 10
> sub: 6
> main: 20
> sub: 7
> main: 30
> sub: 8

perldoc perlsyn

[ snip ]

       Foreach Loops

       The "foreach" loop iterates over a normal list value and sets the
       variable VAR to be each element of the list in turn.  If the variable
       is preceded with the keyword "my", then it is lexically scoped, and is
       therefore visible only within the loop.  Otherwise, the variable is
       implicitly local to the loop and regains its former value upon exiting
       the loop.  If the variable was previously declared with "my", it uses
       that variable instead of the global one, but it's still localized to
       the loop.  This implicit localisation occurs only in a "foreach" loop.



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: Sun, 26 Nov 2006 05:42:12 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Nov 26 2006
Message-Id: <J9Bp6C.Kzu@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Bundle-Perl-Critic-0.01
http://search.cpan.org/~thaljef/Bundle-Perl-Critic-0.01/
A CPAN bundle for Perl::Critic and related modules
----
DBD-TimesTen-0.03
http://search.cpan.org/~wagnerch/DBD-TimesTen-0.03/
TimesTen Driver for DBI
----
DBIx-OO-v0.0.2
http://search.cpan.org/~mishoo/DBIx-OO-v0.0.2/
Database to Perl objects abstraction
----
DBIx-OO-v0.0.3
http://search.cpan.org/~mishoo/DBIx-OO-v0.0.3/
Database to Perl objects abstraction
----
DateTime-Format-Natural-0.14
http://search.cpan.org/~schubiger/DateTime-Format-Natural-0.14/
Create machine readable date/time with natural parsing logic
----
DateTime-Format-Natural-0.15
http://search.cpan.org/~schubiger/DateTime-Format-Natural-0.15/
Create machine readable date/time with natural parsing logic
----
DateTime-Format-Natural-0.16
http://search.cpan.org/~schubiger/DateTime-Format-Natural-0.16/
Create machine readable date/time with natural parsing logic
----
Email-Address-1.883
http://search.cpan.org/~rjbs/Email-Address-1.883/
RFC 2822 Address Parsing and Creation
----
Email-MIME-Attachment-Stripper-1.312
http://search.cpan.org/~rjbs/Email-MIME-Attachment-Stripper-1.312/
Strip the attachments from a mail
----
Email-MIME-Attachment-Stripper-1.313
http://search.cpan.org/~rjbs/Email-MIME-Attachment-Stripper-1.313/
Strip the attachments from a mail
----
Email-MIME-ContentType-1.012
http://search.cpan.org/~rjbs/Email-MIME-ContentType-1.012/
Parse a MIME Content-Type Header
----
Email-Send-2.181
http://search.cpan.org/~rjbs/Email-Send-2.181/
Simply Sending Email
----
Email-Valid-0.177
http://search.cpan.org/~rjbs/Email-Valid-0.177/
Check validity of Internet email addresses
----
Email-Valid-0.178
http://search.cpan.org/~rjbs/Email-Valid-0.178/
Check validity of Internet email addresses
----
Finance-Bank-Postbank_de-0.25
http://search.cpan.org/~corion/Finance-Bank-Postbank_de-0.25/
Check your Postbank.de bank account from Perl
----
Games-Affenspiel-0.1.0
http://search.cpan.org/~migo/Games-Affenspiel-0.1.0/
Play the Affenspiel game
----
Games-Go-SGF-0.02
http://search.cpan.org/~deg/Games-Go-SGF-0.02/
Parse and dissect Standard Go Format files
----
Geo-Ellipsoids-0.01
http://search.cpan.org/~mrdvt/Geo-Ellipsoids-0.01/
Standard perl Geo package for Ellipsoids a and f (and invf) values.
----
Geo-Gpx-v0.11.0
http://search.cpan.org/~andya/Geo-Gpx-v0.11.0/
Create and parse GPX files.
----
Gnome2-VFS-1.061
http://search.cpan.org/~tsch/Gnome2-VFS-1.061/
Perl interface to the 2.x series of the GNOME VFS library
----
HTTP-Server-Simple-0.26
http://search.cpan.org/~jesse/HTTP-Server-Simple-0.26/
Lightweight HTTP server
----
InlineX-XS-0.01
http://search.cpan.org/~smueller/InlineX-XS-0.01/
Auto-convert Inline::C based modules to XS
----
Log-Dispatch-FileRotate-1.16
http://search.cpan.org/~markpf/Log-Dispatch-FileRotate-1.16/
Log to files that archive/rotate themselves
----
Log-Log4perl-1.08
http://search.cpan.org/~mschilli/Log-Log4perl-1.08/
Log4j implementation for Perl
----
Net-sFlow-0.05
http://search.cpan.org/~elisa/Net-sFlow-0.05/
decode sFlow datagrams.
----
Perl-Critic-Lax-0.005
http://search.cpan.org/~rjbs/Perl-Critic-Lax-0.005/
policies that let you slide on common exceptions
----
Perl-Metrics-Simple-0.02
http://search.cpan.org/~matisse/Perl-Metrics-Simple-0.02/
Count packages, subs, lines, etc. of many files.
----
Pod-Readme-0.09
http://search.cpan.org/~rrwo/Pod-Readme-0.09/
Convert POD to README file
----
SOAP-MySOAP-0.02
http://search.cpan.org/~karjala/SOAP-MySOAP-0.02/
An extremely basic SOAP client module
----
SOAP-MySOAP-0.023
http://search.cpan.org/~karjala/SOAP-MySOAP-0.023/
An extremely basic SOAP client module
----
Test-DataDriven-0.03
http://search.cpan.org/~mbarbon/Test-DataDriven-0.03/
when Test::Base is not enough
----
Text-OutdentEdge-0.01
http://search.cpan.org/~hio/Text-OutdentEdge-0.01/
remove indent chars.
----
WWW-PlaceEngine-0.01
http://search.cpan.org/~kokogiko/WWW-PlaceEngine-0.01/
get PC's location information from PlaceEngine.
----
XML-Atom-0.24
http://search.cpan.org/~miyagawa/XML-Atom-0.24/
Atom feed and API implementation
----
XML-Descent-v0.0.1
http://search.cpan.org/~andya/XML-Descent-v0.0.1/
Recursive descent XML parsing
----
XML-LibXML-1.62001
http://search.cpan.org/~pajas/XML-LibXML-1.62001/
Perl Binding for libxml2
----
XML-MyXML-0.04
http://search.cpan.org/~karjala/XML-MyXML-0.04/
A simple XML module
----
XML-MyXML-0.041
http://search.cpan.org/~karjala/XML-MyXML-0.041/
A simple XML module
----
XML-MyXML-0.05
http://search.cpan.org/~karjala/XML-MyXML-0.05/
A simple XML module
----
YAML-Syck-0.72
http://search.cpan.org/~audreyt/YAML-Syck-0.72/
Fast, lightweight YAML loader and dumper


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: 25 Nov 2006 18:47:59 -0800
From: usenet@DavidFilmer.com
Subject: Re: Perl and Online Banking
Message-Id: <1164509279.207670.261000@j72g2000cwa.googlegroups.com>

banker123 wrote:
> Can I access my banking account via the web using perl?

Usually.  Most folks use WWW::Mechanize for that.  Unlike LWP,
Mechanize enables cookies by default, and banks usually use cookies to
secure the session.

You may be interested in some advice I once gave someone regarding
session cookies to grab info from a banking site:

   http://tinyurl.com/y3q37x

A quick look at key.com seems a pretty trivial page to manipulate with
Mechanize. It might be even easier than usual, because the acutal logon
bit is in its own frame
(https://accounts.key.com/frameSignonClient.html), so you can probably
get by with manipulating that one simple frame alone.  You will need
this at a minimum:

   $mech->get('https://accounts.key.com/frameSignonClient.html');
      $mech->field('sUserId', 'myuserid');
      $mech->field('password', 'mypasswd');
   $mech->submit;

But look at the sourcecode for the page and notice that you may need to
set some hidden fields also, especially:
   <input type="hidden" name="jsenabled" value="N"/>

Which tells you you probably need to also include in your constructor:

      $mech->field('jsenabled', 'Y');  #liar!

And so on.  Or, if you don't like trying to mentally parse the HTML
page source, you can use the TamperData plug-in for FireFox and it will
flag you with every parameter that is being sent.



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

Date: 25 Nov 2006 19:45:30 -0800
From: "banker123" <bradbrockman@yahoo.com>
Subject: Re: Perl and Online Banking
Message-Id: <1164512730.542423.182590@l39g2000cwd.googlegroups.com>

usenet@DavidFilmer.com wrote:

> A quick look at key.com seems a pretty trivial page to manipulate with
> Mechanize. It might be even easier than usual, because the acutal logon
> bit is in its own frame

How did you find this frame?  I took a look at the source and it was
not immediatley recognizable.

> But look at the sourcecode for the page and notice that you may need to
> set some hidden fields also, especially:
>    <input type="hidden" name="jsenabled" value="N"/>

Can you expand on hidden fields or direct me to some documentation?

Thanks!



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

Date: Sat, 25 Nov 2006 22:11:07 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl and Online Banking
Message-Id: <slrnemi4ur.kab.tadmc@tadmc30.august.net>

banker123 <bradbrockman@yahoo.com> wrote:

> Can you expand on hidden fields or direct me to some documentation?


   http://www.google.com/search?hl=en&q=hidden+fields


At least _try_ on your own before asking for help.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sat, 25 Nov 2006 23:20:21 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: prevent further hash auto-vivification
Message-Id: <x7odqu4z5m.fsf@mail.sysarch.com>

>>>>> "BM" == Ben Morrow <benmorrow@tiscali.co.uk> writes:


  BM> As of 5.9 fields.pm is implemented in terms of locked hashes instead of
  BM> phashes. This is what they were added to perl for: to keep the
  BM> 'attribute checking' nature of phashes, which was deemed to be a benefit
  BM> of using fields.pm.

  BM> IOO don't use locked hashes; but as of 5.10 they will (or can, anyway)
  BM> use Anno's new 'fieldhashes', which cope correctly with
  BM> threads/overloading/re-blessing.

i tend to not use much inheritance as i prefer delegation in
general. objects owning objects makes more sense to me than objects
being a variant of another object. with delegation you don't worry about
sharing attributes and you should have no issues with those last issues
you mentioned. also delegation is a looser coupling than inheritance and
i am very much in favor of that.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 26 Nov 2006 03:35:45 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: print_r()
Message-Id: <Xns9886DBAF4B1ACcastleamber@130.133.1.4>

Tad McClellan <tadmc@augustmail.com> wrote:

> Mark <Mark.Fenbers@noaa.gov> wrote:
> 
>> Is there anything in Perl that does the equivalent of what print_r() 
>> does in PHP?
> 
> 
> What does print_r() do in PHP?

print_r --  Prints human-readable information about a variable. (Which the 
OP should have provided)

OP: see if Data::Dumper does what you want.

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

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


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

Date: Sat, 25 Nov 2006 23:27:08 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: print_r()
Message-Id: <x7k61i4yub.fsf@mail.sysarch.com>

>>>>> "R" == Ric  <antispam@randometry.com> writes:

  R> print Dumper($yourvar);
  R> print Dumper(%yourhash);

you don't dump hashes like that: 

 perl -MData::Dumper -e '%h = ( foo =>3, bar => 5 ) ;print Dumper %h'
$VAR1 = 'bar';
$VAR2 = 5;
$VAR3 = 'foo';
$VAR4 = 3;

dumper takes a list to dump which means a hash must be passed as a ref
to dump it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Sat, 25 Nov 2006 15:16:24 -0800
From: "Stan R." <stan@invalid.blz/hmrprint/com.com>
Subject: Re: Regex exactly 0, 1 or 2 matches, {0,2} not working
Message-Id: <ekaisc01d20@news4.newsguy.com>

Ben Morrow wrote:
> Quoth "GGB667" <ggb667@gmail.com>:
>> I was really hoping to keep it as a pure regular expression.  What
>> I've ended up doing was having a boatload of different expressions,
>> EX: one with a comma, 1 with a comma and a space, one with a comma,
>> space and number 1-9, and one with a comma, space, number 1-9 and
>> 0-5 and one with all that and a-f after it.  I also have one with -
>> or --.  It's ugly.  Now here's the kicker.  The numbers are not
>> allowed to be identical!
>
> You haven't quoted enough context for me to see what your original
> problem was (and the beginning of this thread is no longer in my
> spool), but...

Root of thread:
Message-ID: <1161309637.973844.203030@e3g2000cwe.googlegroups.com> 




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

Date: 25 Nov 2006 18:05:55 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: the opposite of 'chop'
Message-Id: <1164506755.779184.125470@45g2000cws.googlegroups.com>

Big and Blue wrote:
> Henry Law wrote:
> > Paul Lalli wrote:
> >
> >> my $first_char = substr($string,0,1, q{});
> >
> > I thought this was a typo until I looked up perlop; I see that q{} is
> > synonymous with ''.   Is there a particular benefit from using q{}
> > rather than '' here?  I understand that it's very convenient when
> > single-quoting a string that contains a single quote.
>
>     Why is there anything there at all?
>
>   my $first_char = substr($string, 0, 1);
>
> does the job without any confusion.

Only if you define "the job" to mean "half of what chop() does", which
was the exact mistake the OP made when I answered him too.

Paul Lalli



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

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 10008
****************************************


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