[17685] in Perl-Users-Digest
Perl-Users Digest, Issue: 5105 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 13 21:05:52 2000
Date: Wed, 13 Dec 2000 18:05:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <976759514-v9-i5105@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 13 Dec 2000 Volume: 9 Number: 5105
Today's topics:
Re: =~ operator (Tad McClellan)
Re: =~ operator (Tom Christiansen)
Re: Better way to remove lines from output? <khedger@mindspring.com>
Re: Debugging (Mark-Jason Dominus)
Re: Eliminating unneeded whitespace... <jeffp@crusoe.net>
Re: Excluding a string from a RE (Greg Bacon)
Re: Extracting a substring from a string <khedger@mindspring.com>
Re: getting OS info (Greg Bacon)
Re: got problem installing tk fallenang3l@my-deja.com
How to make LWP::UserAgent "frame enabled" <carlywu@yahoo.com>
Re: How to make LWP::UserAgent "frame enabled" <tinamue@zedat.fu-berlin.de>
Re: How to make LWP::UserAgent "frame enabled" (Mark-Jason Dominus)
Re: How to make LWP::UserAgent "frame enabled" <tony_curtis32@yahoo.com>
Re: http_referer Problem!? <jmv16@cornell.edu>
Re: initialize array of identical elements (Tom Hoffmann)
Re: initialize array of identical elements <uri@sysarch.com>
Re: initialize array of identical elements <joe+usenet@sunstarsys.com>
Re: initialize array of identical elements <jeffp@crusoe.net>
Re: initialize array of identical elements <joe+usenet@sunstarsys.com>
Re: initialize array of identical elements <jeffp@crusoe.net>
NEws Script <enigmabomb@home.gotohellspammers.ihopeyourotinghellyouspamminggarbage.com>
Re: Parser to extract {} functions from a script (AMPLE (Tad McClellan)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 13 Dec 2000 09:27:29 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: =~ operator
Message-Id: <slrn93f5b1.pt.tadmc@maxim.metronet.com>
Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote:
>Martin Schmidt wrote in comp.lang.perl.misc:
>> Newbie question...
>> What is the =~ operator called?
>> I'm reading 'Learning Perl' and they just call it the
>> =~ operator.
>
>I once heard a frech developer call it the "tętard" -- the french
>word for "tadpole".
Hey I like that one!
But I am probably biased :-)
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Dec 2000 17:07:04 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: =~ operator
Message-Id: <3a380f28@cs.colorado.edu>
In article <3A368845.4C0395F4@pitt.edu>, Martin Schmidt <mcs2@pitt.edu> wrote:
>Newbie question...
>What is the =~ operator called?
>I'm reading 'Learning Perl' and they just call it the
>=~ operator.
It's the binding operator. Actually, there are two of them: both
the =~ (equaltilde) operator and its semi-negation, the !~ (bangtilde)
operator are binding operators.
From the Camel:
=head1 Binding Operators
=for index
binding;operators
@equal=&eq; (equal sign) ;@equaltilde=&eq;~ (binding) operator
binary;binding (&eq;~) operator
Binary C<=~> binds a string expression to a pattern match,
substitution, or transliteration (loosely called translation).
These operations would otherwise search or modify the string
contained in C<$_> (the default variable). The string you want
to bind is put on the left, while the operator itself is put
on the right. The return value indicates the success or failure
of the operator on the right, since the binding operator doesn't
really do anything on its own.
[...DELETA...]
=for index
@bang=! (bang) ;@bangtilde=!~ (binding) operator
binary;binding (!~) operator
Binary C<!~> is just like C<=~> except the return value is
negated in the logical sense. The following expressions are
functionally equivalent:
$string !~ /pattern/
not $string =~ /pattern/
--tom
------------------------------
Date: Thu, 14 Dec 2000 00:38:32 GMT
From: "bigtiny" <khedger@mindspring.com>
Subject: Re: Better way to remove lines from output?
Message-Id: <cEUZ5.104030$751.2554312@typhoon.ne.mediaone.net>
Michael Budash <mbudash@sonic.net> wrote in message
news:mbudash-C8F5FD.17430512122000@news.pacbell.net...
> In article <UVzZ5.100323$751.2448696@typhoon.ne.mediaone.net>,
> "bigtiny" <khedger@mindspring.com> wrote:
>
> > <Odd_Carnivals@yahoo.com> wrote in message
> > news:9163c7$2e9$1@nnrp1.deja.com...
> > > Hi Perl gurus,
> > >
> > > Any suggestions for how the following could be improved?
> > > What I'm doing is creating an output file that is identical
> > > to the input file minus the second, third and last lines,
> > > and with the linebreak removed from the next-to-last line
> > > (i.e. the last line of the output file).
> > >
> > > The following works, but I suspect there are better ways
> > > to do it (I'm new to Perl).
> > >
> > > $prev_line = <IN>; # Keep line 1.
> > > while($. < 3) {<IN>}; # Skip lines 2 & 3.
> > > while($line = <IN>) {
> > > print OUT ($prev_prev_line);
> > > $prev_prev_line = $prev_line;
> > > $prev_line = $line;
> > > }
> > > $prev_prev_line =~ s/\n//; #remove linebreak
> > > print OUT ($prev_prev_line);
> > >
> >
> >
> > You forgot the closed } for the outer while loop.....
> >
> > k
> >
>
> the first while loop isn't an outer, it's just a while loop:
>
> while($. < 3) {<IN>}; # Skip lines 2 & 3.
>
> ??
> --
> Michael Budash ~~~~~~~~~~ mbudash@sonic.net
Duhhhhh!!!! =:-)
You're right, of course, Mike. Sorry about that.....does anyone else find
that in certain editors/viewers, the (,<, and { get very hard to
distinguish....or am I REALLY going blind??? =:-)
keith
------------------------------
Date: Thu, 14 Dec 2000 00:49:08 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Debugging
Message-Id: <3a381903.2de1$cf@news.op.net>
In article <918lde$2783$1@msunews.cl.msu.edu>, Eric <eric.kort@vai.org> wrote:
>I'm having some terrible memory problems, so two basic questions:
>
>1) How exactly to I go about recompiling the perl interpretter so I can use
>the -d switch (which I can't under our current configuration).
The -d switch is always available. You are confusing it with the -D switch.
-d enables the interactive debugger. -D is probably not what you want.
But instructions for enabling -D are in the INSTALL file that comes
with the Perl source code.
>2) How can I get the debugger (or anything else) to report the memory
>allocated to any and all current variables?
I don't know. What are you really trying to accomplish?
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Wed, 13 Dec 2000 18:05:49 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Eliminating unneeded whitespace...
Message-Id: <Pine.GSO.4.21.0012131748570.19179-100000@crusoe.crusoe.net>
[posted & mailed]
On Dec 13, Chris Stith said:
>The below results show that, properly implemented,
>the substitutions are faster.
Except that your benchmark is not properly implemented.
>timethese 1000000, {
> a => q!$x = join ' ', split ' ', $x;!,
> b1 => q!$yy =~ s/\s+/ /g; $yy =~ s/(?:^\s|\s$)//;!,
> b2 => q!$y =~ s/(?:^\s+|\s+$)//; $y =~ s/\s+/ /g;!,
> c1 => q!$z =~ s/\s+/ /g; $z =~ s/^\s//; $z =~ s/\s$//;!,
> c2 => q!$zz =~ s/^\s+//; $zz =~ s/\s+$//; $zz =~ s/\s+/ /g;!
>};
Your b1 and b2 should have /g modifiers on the ^\s|\s$ part. They
don't. But your code still "works" -- this is because your tests are
tainted -- you use the SAME strings each time. Which means that the work
doesn't need to be done anymore. After 'a' is run ONCE, $x is no longer
the string it used to be. Now it's the properly spaced string.
I ran a better benchmark, and used code blocks instead of strings to be
eval()ed -- I find I get better results this way.
#!/usr/bin/perl -w
use Benchmark;
use strict;
my $str = ' This should throw away unneeded spaces. ';
print "<$_>\n" for join_split(), r_A_1(), r_A_2(), r_B_1(), r_B_2();
timethese(-10, {
join_split => \&join_split,
regex_A_1 => \&r_A_1,
regex_A_2 => \&r_A_2,
regex_B_1 => \&r_B_1,
regex_B_2 => \&r_B_2,
});
sub join_split {
my $x = $str;
$x = join ' ', split ' ', $x;
$x;
}
sub r_A_1 {
my $x = $str;
$x =~ s/\s+/ /g;
$x =~ s/(?:^\s|\s$)//g;
$x;
}
sub r_A_2 {
my $x = $str;
$x =~ s/(?:^\s+|\s+$)//g;
$x =~ s/\s+/ /g;
$x;
}
sub r_B_1 {
my $x = $str;
$x =~ s/\s+/ /g;
$x =~ s/^\s//;
$x =~ s/\s$//;
$x;
}
sub r_B_2 {
my $x = $str;
$x =~ s/^\s+//;
$x =~ s/\s+$//;
$x =~ s/\s+/ /g;
$x;
}
__END__
The abbreviated results are as follows:
<This should throw away unneeded spaces.>
<This should throw away unneeded spaces.>
<This should throw away unneeded spaces.>
<This should throw away unneeded spaces.>
<This should throw away unneeded spaces.>
Benchmark: running join_split, regex_A_1, regex_A_2, regex_B_1, regex_B_2,
each for at least 10 CPU seconds...
join_split: 7112.80/s (n=74471)
regex_A_1: 3177.52/s (n=32506)
regex_A_2: 2984.96/s (n=30566)
regex_B_1: 5044.14/s (n=51198)
regex_B_2: 4991.71/s (n=50566)
So in 10 seconds, join_split() got in the most iterations. The regex_A
approach was slower than the regex_B approach.
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
PerlMonks - An Online Perl Community http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
------------------------------
Date: Wed, 13 Dec 2000 23:09:50 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Excluding a string from a RE
Message-Id: <t3g0du5ngctj64@corp.supernews.com>
In article <918t3m$dfj$1@nnrp1.deja.com>,
Alexander Skwar <ASkwar@DigitalProjects.com> wrote:
: I want to write a regular expression that abides to this rule:
: "Find NT followed by 0 or more whitespaces and after that not the string
: 5.0"
How about the following?
#! /usr/bin/perl -w
use strict;
my %agent = (
'NT' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)',
'2000' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
'foo' => 'glarch 2.0',
);
for (keys %agent) {
my $agent = $agent{$_};
if ($agent =~ /NT(\s*5\.0)?/ && $#- != 1) {
print "MATCH: $agent\n";
}
}
Read the perlvar documentation on the @- magic array. ($#- is the
last index of the @- array.)
: I wrote this non-functional RE:
:
: "|NT[\s]*?[^5]|"
:
: This matches the string for Windows NT 4.0, but for an unknown reason
: (at least to me) also the string for Windows 2000.
It matches for NT because /[\s]*?/ successfully matches nothing and
/[^5]/ matches the closing parenthesis, which is not a '5'. It matches
for Win2k because, again, /[\s]*?/ successfully matches nothing and
/[^5]/ matches the space following 'NT'.
Keep in mind that the regular expression matcher is a persistent
sumbitch. It will do everything it can to find a match.
: If I replace the "*"
: (star) by a "+" (plus), it does not match Windows 2000 (understood), but
: it also doesn't match Win NT 4.0 (why?).
It doesn't match for NT because there are no spaces after 'NT', so
/[\s]+?/ fails.
Incidentally, /[\s]+?/ is the same as /\s+?/.
: Note: Crosspost to clp and clp.misc; Followup-To: set to
: comp.lang.perl.misc
The comp.lang.perl newsgroup is dead. Don't bother posting there.
Greg
--
I use Perl, Emacs, and zsh. All easy simple tools with nary a feature
to remember.
-- Jarkko Hietaniemi
------------------------------
Date: Thu, 14 Dec 2000 00:35:32 GMT
From: "bigtiny" <khedger@mindspring.com>
Subject: Re: Extracting a substring from a string
Message-Id: <oBUZ5.104014$751.2551882@typhoon.ne.mediaone.net>
Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote in message
news:slrn93enbe.7b.bernard.el-hagin@gdndev25.lido-tech...
> On Wed, 13 Dec 2000 11:11:40 GMT, dazza100@my-deja.com
> <dazza100@my-deja.com> wrote:
> >Hello,
> >
> >I'm new to Perl. Could someone please tell me how
> >I would take a string like
> >
> >message_address:[0xbd0b48] info:order_acpt
> >
> >and extract the hex number between the '[' and ']'
>
> $_ = 'message_address:[0xbd0b48] info:order_acpt';
>
> print (substr $_, 17, 8);
>
> or, if you don't know where in the string the [] will appear:
>
> print $1 if /\[([^\]]*)\]/;
>
> Cheers,
> Bernard
> --
> perl -le '$#="Just Another Perl Hacker"; print \Bernard'
Not a good idea to mess with $_, right.....so I'd suggest something
$record or $inrec or something.....
k
------------------------------
Date: Wed, 13 Dec 2000 23:10:58 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: getting OS info
Message-Id: <t3g0g2t6ar427a@corp.supernews.com>
In article <918se9$cth$1@nnrp1.deja.com>,
<gurusri@my-deja.com> wrote:
: How to get the operating system information from a perl script. Ex: I
: have to call a api which is dependent on OS, I have to first determine
: the operating system where the script is running. How to do it?
That's in one of Perl's magic variables. The perlvar manpage documents
Perl's magic variables.
Greg
--
Now, it might be true that www.mtv.com attracts more visitors and gets
more "hits" than a site that makes RFCs available. But who the fuck cares?
-- Abigail
------------------------------
Date: Wed, 13 Dec 2000 23:54:31 GMT
From: fallenang3l@my-deja.com
Subject: Re: got problem installing tk
Message-Id: <91927k$hvi$1@nnrp1.deja.com>
In article <917k6j$nf5$1@taliesin.netcom.net.uk>,
"»´ä¸}" <nobody@nowhere.net> wrote:
> ##### i type in perl makefile.pl in win32 dos , and recieved
>
> PPM for perl5.006
> Test Compiling config/signedchar.c
> C:\Perl\bin\Perl.exe is installed in C:\Perl\lib okay
> Bad command or file name
> Test Compiling config/Ksprintf.c
> Bad command or file name
> Skip InputO on MSWin32
> Skip Mwm on MSWin32
> Skip WinPhoto on MSWin32
> Generating Dependencies for MSWin32, win_arch=MSWin32
> Loose imgPmap.h
> Loose imgUnixPmap.c
> Test Compiling config/Hstrtoul.c
> Bad command or file name
> Test Compiling config/Hstrdup.c
> Bad command or file name
> Test Compiling config/Hstrcasecmp.c
> Bad command or file name
> Extracting imgPmap.h
> Extracting imgUnixPmap.c
> Usage: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck]
> [-nolinenumbers] [-nooptimize] [-noinout] [-noargtypes] [-s pattern]
> [-typemap typemap]... file.xs
> Finding dependancies for ClientWin.c
> Finding dependancies for Lang_f.c
> Finding dependancies for Xlib_f.c
> Finding dependancies for XrmOption.c
> Finding dependancies for exWinHandle.c
> Finding dependancies for imgBMP.c
> Finding dependancies for imgGIF.c
> Finding dependancies for imgInit.c
> Finding dependancies for imgInt_f.c
> Finding dependancies for imgObj.c
> Finding dependancies for imgUnixPmap.c
> Finding dependancies for imgUtil.c
> Finding dependancies for imgWindow.c
> Finding dependancies for imgXBM.c
> Finding dependancies for imgXPM.c
> Finding dependancies for ptkCanvGrid.c
> Finding dependancies for ptkCanvGroup.c
> Finding dependancies for stbDItem.c
> Finding dependancies for stbDashCustom.c
> Finding dependancies for stbDiStyle.c
> Finding dependancies for stubs.c
> Finding dependancies for tclAsync.c
> Finding dependancies for tclEvent.c
> Finding dependancies for tclHash.c
> Finding dependancies for tclNotify.c
> Finding dependancies for tclPreserve.c
> Finding dependancies for tclTimer.c
> Finding dependancies for tclWinNotify.c
> Finding dependancies for tclWinTime.c
> Finding dependancies for tixCompat.c
> Finding dependancies for tixDItem.c
> Finding dependancies for tixDiITxt.c
> Finding dependancies for tixDiImg.c
> Finding dependancies for tixDiStyle.c
> Finding dependancies for tixDiText.c
> Finding dependancies for tixDiWin.c
> Finding dependancies for tixError.c
> Finding dependancies for tixForm.c
> Finding dependancies for tixFormMisc.c
> Finding dependancies for tixGrData.c
> Finding dependancies for tixGrFmt.c
> Finding dependancies for tixGrRC.c
> Finding dependancies for tixGrSel.c
> Finding dependancies for tixGrSort.c
> Finding dependancies for tixGrUtl.c
> Finding dependancies for tixGrid.c
> Finding dependancies for tixHLCol.c
> Finding dependancies for tixHLHdr.c
> Finding dependancies for tixHLInd.c
> Finding dependancies for tixHList.c
> Finding dependancies for tixImgCmp.c
> Finding dependancies for tixImgXpm.c
> Finding dependancies for tixImgXpm_f.c
> Finding dependancies for tixInputO.c
> Finding dependancies for tixInt_f.c
> Finding dependancies for tixList.c
> Finding dependancies for tixNBFrame.c
> Finding dependancies for tixScroll.c
> Finding dependancies for tixSmpLs.c
> Finding dependancies for tixTList.c
> Finding dependancies for tixUtils.c
> Finding dependancies for tixVars.c
> Finding dependancies for tixWinDraw.c
> Finding dependancies for tixWinXpm.c
> Finding dependancies for tix_f.c
> Finding dependancies for tk3d.c
> Finding dependancies for tkAtom.c
> Finding dependancies for tkBind.c
> Finding dependancies for tkBitmap.c
> Finding dependancies for tkButton.c
> Finding dependancies for tkCanvArc.c
> Finding dependancies for tkCanvBmap.c
> Finding dependancies for tkCanvImg.c
> Finding dependancies for tkCanvLine.c
> Finding dependancies for tkCanvPoly.c
> Finding dependancies for tkCanvPs.c
> Finding dependancies for tkCanvText.c
> Finding dependancies for tkCanvUtil.c
> Finding dependancies for tkCanvWind.c
> Finding dependancies for tkCanvas.c
> Finding dependancies for tkClipboard.c
> Finding dependancies for tkCmds.c
> Finding dependancies for tkColor.c
> Finding dependancies for tkConfig.c
> Finding dependancies for tkCursor.c
> Finding dependancies for tkEntry.c
> Finding dependancies for tkError.c
> Finding dependancies for tkEvent.c
> Finding dependancies for tkEvent_f.c
> Finding dependancies for tkFileFilter.c
> Finding dependancies for tkFocus.c
> Finding dependancies for tkFont.c
> Finding dependancies for tkFrame.c
> Finding dependancies for tkGC.c
> Finding dependancies for tkGeometry.c
> Finding dependancies for tkGet.c
> Finding dependancies for tkGrab.c
> Finding dependancies for tkGrid.c
> Finding dependancies for tkImage.c
> Finding dependancies for tkImgBmap.c
> Finding dependancies for tkImgPPM.c
> Finding dependancies for tkImgPhoto.c
> Finding dependancies for tkImgPhoto_f.c
> Finding dependancies for tkImgUtil.c
> Finding dependancies for tkInt_f.c
> Finding dependancies for tkListbox.c
> Finding dependancies for tkMacWinMenu.c
> Finding dependancies for tkMenu.c
> Finding dependancies for tkMenuDraw.c
> Finding dependancies for tkMenubutton.c
> Finding dependancies for tkMessage.c
> Finding dependancies for tkOption.c
> Finding dependancies for tkOption_f.c
> Finding dependancies for tkPack.c
> Finding dependancies for tkPlace.c
> Finding dependancies for tkPointer.c
> Finding dependancies for tkProperty.c
> Finding dependancies for tkRectOval.c
> Finding dependancies for tkScale.c
> Finding dependancies for tkScrollbar.c
> Finding dependancies for tkSelect.c
> Finding dependancies for tkSquare.c
> Finding dependancies for tkText.c
> Finding dependancies for tkTextBTree.c
> Finding dependancies for tkTextDisp.c
> Finding dependancies for tkTextImage.c
> Finding dependancies for tkTextIndex.c
> Finding dependancies for tkTextMark.c
> Finding dependancies for tkTextTag.c
> Finding dependancies for tkTextWind.c
> Finding dependancies for tkTrig.c
> Finding dependancies for tkUnixMenubu.c
> Finding dependancies for tkUnixScale.c
> Finding dependancies for tkUtil.c
> Finding dependancies for tkVisual.c
> Finding dependancies for tkWin3d.c
> Finding dependancies for tkWinButton.c
> Finding dependancies for tkWinClipboard.c
> Finding dependancies for tkWinColor.c
> Finding dependancies for tkWinCursor.c
> Finding dependancies for tkWinDialog.c
> Finding dependancies for tkWinDraw.c
> Finding dependancies for tkWinEmbed.c
> Finding dependancies for tkWinFont.c
> Finding dependancies for tkWinImage.c
> Finding dependancies for tkWinInt_f.c
> Finding dependancies for tkWinKey.c
> Finding dependancies for tkWinMenu.c
> Finding dependancies for tkWinPixmap.c
> Finding dependancies for tkWinPointer.c
> Finding dependancies for tkWinRegion.c
> Finding dependancies for tkWinScrlbr.c
> Finding dependancies for tkWinSend.c
> Finding dependancies for tkWinWindow.c
> Finding dependancies for tkWinWm.c
> Finding dependancies for tkWinX.c
> Finding dependancies for tkWin_f.c
> Finding dependancies for tkWindow.c
> Finding dependancies for tk_f.c
> Finding dependancies for xcolors.c
> Finding dependancies for xdraw.c
> Finding dependancies for xgc.c
> Finding dependancies for ximage.c
> Finding dependancies for xutil.c
> Finding dependancies for X.xs
> Finding dependancies for Xlib.xs
> Finding dependancies for Pixmap.xs
> Finding dependancies for TixGrid.xs
> Finding dependancies for Text.xs
> Finding dependancies for TList.xs
> Finding dependancies for Scrollbar.xs
> Finding dependancies for Scale.xs
> Finding dependancies for Photo.xs
> Finding dependancies for NBFrame.xs
> Finding dependancies for Menubutton.xs
> Finding dependancies for Listbox.xs
> Finding dependancies for IO.xs
> Finding dependancies for HList.xs
> Finding dependancies for Event.xs
> Finding dependancies for pTkCallback.c
> Finding dependancies for tclEvent.c
> Finding dependancies for tclNotify.c
> Finding dependancies for tclPlatEvent.c
> Finding dependancies for tclPlatNotfy.c
> Finding dependancies for tclPlatTime.c
> Finding dependancies for tclTimer.c
> Finding dependancies for tkWin32Dll.c
> Finding dependancies for Entry.xs
> Finding dependancies for Win32Site.xs
> Finding dependancies for Compound.xs
> Finding dependancies for Canvas.xs
> Finding dependancies for Bitmap.xs
> Finding dependancies for Tk.xs
> Finding dependancies for chnGlue.c
> Finding dependancies for evtGlue.c
> Finding dependancies for objGlue.c
> Finding dependancies for tixGlue.c
> Finding dependancies for tkGlue.c
> Finding dependancies for tkGlue_f.c
> Finding dependancies for tkWin32Dll.c
> Writing Makefile for Tk::pTk
> Writing Makefile for Tk::pod
> Writing Makefile for Tk::demos
> Writing Makefile for Tk::X
> Writing Makefile for Tk::Xlib
> Writing Makefile for Tk::Tixish
> Writing Makefile for Tk::Pixmap
> Writing Makefile for Tk::TixGrid
> Writing Makefile for Tk::TextList
> Writing Makefile for Tk::Text
> Writing Makefile for Tk::TList
> Writing Makefile for Tk::Scrollbar
> Writing Makefile for Tk::Scale
> Writing Makefile for Tk::Photo
> Writing Makefile for Tk::NBFrame
> Writing Makefile for Tk::Menubutton
> Writing Makefile for Tk::Listbox
> Writing Makefile for Tk::IO
> Writing Makefile for Tk::HList
> Writing Makefile for Tk::Event
> Writing Makefile for Tk::Entry
> Writing Makefile for Tk::DragDrop::Win32Site
> Writing Makefile for Tk::DragDrop
> Writing Makefile for Tk::Compound
> Writing Makefile for Tk::Canvas
> Writing Makefile for Tk::Bitmap
> Writing Makefile for Tk
>
> #####then i try to hello world
>
> #!/usr/bin/perl -w
> use Tk;
> my $mw = MainWindow->new;
> $mw->Button(-text => "Hello World!", -command =>sub{exit})->pack;
> MainLoop;
>
> #####and i got error messages like that :
>
> Can't locate Tk/Event.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .) at Tk.pm line 13.
> BEGIN failed--compilation aborted at Tk.pm line 13.
> Compilation failed in require at C:\TEST.PL line 2.
> BEGIN failed--compilation aborted at C:\TEST.PL line 2.
>
> what's the problem and plz anyone give me a solution
>
>
Use the ppm from ActiveState's ppm repository.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 14 Dec 2000 11:23:42 +1100
From: "Carl Wu" <carlywu@yahoo.com>
Subject: How to make LWP::UserAgent "frame enabled"
Message-Id: <3a38123d$0$19441$7f31c96c@news01.syd.optusnet.com.au>
When I use a LWP::UserAgent to send a request for a web page, I got a
response that I need a frame enabled browser, how can I get around with
that?
Many thanks,
Carl
------------------------------
Date: 14 Dec 2000 00:42:53 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: How to make LWP::UserAgent "frame enabled"
Message-Id: <91952d$3a96v$1@fu-berlin.de>
hi,
Carl Wu <carlywu@yahoo.com> wrote:
> When I use a LWP::UserAgent to send a request for a web page, I got a
> response that I need a frame enabled browser, how can I get around with
> that?
hm, i would suggest, parse the page for the frame-urls
and display them as links. that's what lynx does.
hth,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Thu, 14 Dec 2000 00:43:25 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: How to make LWP::UserAgent "frame enabled"
Message-Id: <3a3817ac.2dbc$14b@news.op.net>
In article <3a38123d$0$19441$7f31c96c@news01.syd.optusnet.com.au>,
Carl Wu <carlywu@yahoo.com> wrote:
>When I use a LWP::UserAgent to send a request for a web page, I got a
>response that I need a frame enabled browser, how can I get around with
>that?
The result will also have <frame> tag swith the URLs for the
individual frames. Extract the URLs for the frames and request them
separately.
HTML::LinkExtor will pull out the URLs for you.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: 13 Dec 2000 18:48:29 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: How to make LWP::UserAgent "frame enabled"
Message-Id: <878zpjzv36.fsf@limey.hpcc.uh.edu>
>> On Thu, 14 Dec 2000 00:43:25 GMT,
>> mjd@plover.com (Mark-Jason Dominus) said:
> In article <3a38123d$0$19441$7f31c96c@news01.syd.optusnet.com.au>,
> Carl Wu <carlywu@yahoo.com> wrote:
>> When I use a LWP::UserAgent to send a request for a web page, I got
>> a response that I need a frame enabled browser, how can I get
>> around with that?
> The result will also have <frame> tag swith the URLs for the
> individual frames. Extract the URLs for the frames and request them
> separately.
...unless the document you get back from the server has been handled
locally by something that purports to check the browsers's ID and
refuses to serve anything it regards as non-frame-capable. If that's
the case, you probably just want to tell the UserAgent instance to
pretend it is Mozilla or IE. That's a silly check for the server to
make IMHO, it smacks of an ironically Byzantine attempt at laziness
(providing no <noframes> alternative).
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Wed, 13 Dec 2000 20:45:41 -0500
From: "Jeffrey M. Vinocur" <jmv16@cornell.edu>
Subject: Re: http_referer Problem!?
Message-Id: <jmv16-891091.20454113122000@newsstand.cit.cornell.edu>
In article <m1elzc1gde.fsf@halfdome.holdit.com>, merlyn@stonehenge.com
(Randal L. Schwartz) wrote:
:>>>>> "Tina" == Tina Mueller <tinamue@zedat.fu-berlin.de> writes:
[Referrer HTTP header]
:Tina> you must know that some environment variables can
:Tina> be manipulated.
:
:Or to paraphrase, "it'll keep only the stupid people out!".
Well, there is one reasonable use. See, it prevents innocent trespass
as well dumb purposeful trespass.
You can check it to prevent outside websites from guiding users into the
midst of your website without their knowledge. For example, if you have
a clipart collection online, and want to force people to copy the images
to their own servers and not just link to yours, you could check
Referrer.
--
Jeffrey M. Vinocur * jmv16@cornell.edu
http://www.people.cornell.edu/pages/jmv16/
------------------------------
Date: Wed, 13 Dec 2000 23:29:29 GMT
From: tom.hoffmann@worldnet.att.net (Tom Hoffmann)
Subject: Re: initialize array of identical elements
Message-Id: <slrn93g1cl.lk.tom.hoffmann@localhost.localdomain>
>my @a = (VAL) x N;
Can this same pithiness be extended for multi-dimentional arrays,
assuming each array in the "array of arrays" has the same number of
elements?
------------------------------
Date: Wed, 13 Dec 2000 23:46:47 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: initialize array of identical elements
Message-Id: <x7u287j34o.fsf@home.sysarch.com>
>>>>> "TH" == Tom Hoffmann <tom.hoffmann@worldnet.att.net> writes:
>> my @a = (VAL) x N;
TH> Can this same pithiness be extended for multi-dimentional arrays,
TH> assuming each array in the "array of arrays" has the same number of
TH> elements?
you need to be more specific about that. but map will work with that
expression and anon arrays:
@AofA = map [ (VAL) x N ], 1 .. $maxAofA ;
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 13 Dec 2000 18:48:37 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: initialize array of identical elements
Message-Id: <m3vgsnvq5m.fsf@mumonkan.sunstarsys.com>
tom.hoffmann@worldnet.att.net (Tom Hoffmann) writes:
> >my @a = (VAL) x N;
>
> Can this same pithiness be extended for multi-dimentional arrays,
> assuming each array in the "array of arrays" has the same number of
> elements?
You mean like this?
my @a = ([(VAL) x N]) x M; # array of arrayrefs: $a[2][3]
--
Joe Schaefer
------------------------------
Date: Wed, 13 Dec 2000 19:18:42 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: initialize array of identical elements
Message-Id: <Pine.GSO.4.21.0012131917540.19179-100000@crusoe.crusoe.net>
[posted & mailed]
On Dec 13, Joe Schaefer said:
>tom.hoffmann@worldnet.att.net (Tom Hoffmann) writes:
>
>> >my @a = (VAL) x N;
>>
>> Can this same pithiness be extended for multi-dimentional arrays,
>> assuming each array in the "array of arrays" has the same number of
>> elements?
>
>my @a = ([(VAL) x N]) x M; # array of arrayrefs: $a[2][3]
That uses the same array reference M times. You need to use something
like map(), which will create a new array ref each time (as uri showed).
my @a = map [ (VAL) x N ], 1 .. M;
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
PerlMonks - An Online Perl Community http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
------------------------------
Date: 13 Dec 2000 19:25:42 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: initialize array of identical elements
Message-Id: <m3puivvoft.fsf@mumonkan.sunstarsys.com>
Jeff Pinyan <jeffp@crusoe.net> writes:
> On Dec 13, Joe Schaefer said:
>
> >tom.hoffmann@worldnet.att.net (Tom Hoffmann) writes:
> >
> >> >my @a = (VAL) x N;
> >>
> >> Can this same pithiness be extended for multi-dimentional arrays,
> >> assuming each array in the "array of arrays" has the same number of
> >> elements?
> >
> >my @a = ([(VAL) x N]) x M; # array of arrayrefs: $a[2][3]
>
> That uses the same array reference M times. You need to use something
> like map(), which will create a new array ref each time (as uri showed).
>
> my @a = map [ (VAL) x N ], 1 .. M;
>
OOPS! Thanks for catching that.
btw- please don't cc me usenet postings. That mail-copies-to never
header I use is supposed to prevent that, but maybe I don't have
it set up right.
--
Joe Schaefer
------------------------------
Date: Wed, 13 Dec 2000 20:01:17 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: initialize array of identical elements
Message-Id: <Pine.GSO.4.21.0012132000310.19179-100000@crusoe.crusoe.net>
On Dec 13, Joe Schaefer said:
>btw- please don't cc me usenet postings. That mail-copies-to never
>header I use is supposed to prevent that, but maybe I don't have
>it set up right.
Sorry, I didn't notice it. And in Pine, I can choose manually to send to
sender, newsgroup, or both. I doubt there's a mechanism to stop Pine.
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
PerlMonks - An Online Perl Community http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
------------------------------
Date: Thu, 14 Dec 2000 01:15:12 GMT
From: "EnIgMaBoM" <enigmabomb@home.gotohellspammers.ihopeyourotinghellyouspamminggarbage.com>
Subject: NEws Script
Message-Id: <AaVZ5.38657$w35.6834654@news1.rdc1.nj.home.com>
Hi, My name is Josh, I am a webmaster of a faily successful site. I have
been learning perl, I like it a lot. Ive started preparing to write a news
script. What I want to do, is query a database of news files, so that
anything older than a week is dumped into the archives. I cant think of a
good way to store and query the news entries. I thought of a hash tied to a
dbm, but that can only store 1024 characters, and using an html file to
write....but.....I wouldnt be able to query it. I need some help here. ,
any ideas?? Also, I am not asking for code, just a few pointers.
Josh Ziering
------------------------------
Date: Wed, 13 Dec 2000 18:14:53 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Parser to extract {} functions from a script (AMPLE)
Message-Id: <slrn93g47t.12u.tadmc@maxim.metronet.com>
Mike Saunders <micsaund@home.com> wrote:
>
>I've been searching around the net looking for this script,
Have you tried searching on your hard drive? :-)
>I think this is more complex than it first appears, because
>of the possibility of the "init" function being in the file
>within /* .... */ comments.
^^^^^^^
^^^^^^^
So strip the comments first then.
perldoc -q comment
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 5105
**************************************