[18994] in Perl-Users-Digest
Perl-Users Digest, Issue: 1189 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 25 14:05:36 2001
Date: Mon, 25 Jun 2001 11:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <993492309-v10-i1189@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 25 Jun 2001 Volume: 10 Number: 1189
Today's topics:
Re: Checking for duplicates before appending to file (Sweth Chandramouli)
Re: converting from a @ array or list to sclar variable (Mark Jason Dominus)
Re: converting from a @ array or list to sclar variable <ren@tivoli.com>
Curses::ANSIColor Examples <cjamblues@qwest.net>
Re: fastest way to count lines in a bunch of files. <patelnavin@icenet.net>
Graph::BFS parameters <john@princenaseem.com>
How can I get rid of lines with garbage in a large fil <rig01@yahoo.com>
Re: How can I get rid of lines with garbage in a large nobull@mail.com
Re: How can I get rid of lines with garbage in a large <ren@tivoli.com>
How do I cope with pound (currency) sign? <dn131@yahoo.com>
Re: Newbie - Compare text files (Mark Jason Dominus)
Re: Newbie - Compare text files <plarkinNOSPAM@indeliblelink.com>
Re: Newbie - Compare text files (Mark Jason Dominus)
Re: Newbie - Compare text files <pne-news-20010625@newton.digitalspace.net>
Passing File Handles when using Win32::API (dwthomas)
Re: Perl *is* strongly typed (was Re: Perl description) <jurgenex@hotmail.com>
Re: perl compilation on HPUX-11 <h.m.brand@hccnet.nl>
Re: Perl script from cron being mysteriously killed. A nobull@mail.com
perl script worked on redhat 6 but not 7.x (Michael M.)
Re: perl Tk::DragDrop (comp.lang.perl.tk has not respon <person@company.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 25 Jun 2001 17:57:34 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: Re: Checking for duplicates before appending to file
Message-Id: <iYKZ6.11296$Ga.1848364@news1.rdc1.md.home.com>
In article <tjdlpk38ueon8d@corp.supernews.co.uk>,
David Soming <davsoming@lineone.net> wrote:
>Hi,
>I would like to check for duplicates in my database before appending:
What is making use of the database? If it's another Perl
app, or if your app persists (I suspect the latter isn't true, though,
given the HTML in your example--I presume that this is for some CGI
app), it would probably be a lot easier and more efficient to use a tied
hash of some sort. If you need to store the info in flat files, then
(depending on the number of records you anticipate having), you might
want to consider hashing your addresses into separate files by the first
character or two, so that you don't have to grep through the entire list
every time.
-- Sweth.
--
Sweth Chandramouli ; <sweth+perl@gwu.edu>
------------------------------
Date: Mon, 25 Jun 2001 15:43:44 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: converting from a @ array or list to sclar variable
Message-Id: <3b375c2e.6c4c$19e@news.op.net>
In article <9h7ek9$cdebj$1@ID-93885.news.dfncis.de>,
Aman Patel <patelnavin@icenet.net> wrote:
>And one more question: does this:
>$scalar_var = "@array";
>does this internally:
>$scalar_var = join ( ' ', @array ); #is this 'internally same as
> # doing $scalar_var = "@array"
Not quite. It does
$scalar_var = join ($", @array);
>Is this fast enough:
Only you can answer that question.
However, I suggest that if you are really worried about speed to this
degree, then you may be using the wrong language.
--
@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: 25 Jun 2001 10:13:09 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: converting from a @ array or list to sclar variable
Message-Id: <m366dka8ze.fsf@dhcp9-173.support.tivoli.com>
On Mon, 25 Jun 2001, patelnavin@icenet.net wrote:
> Whats the best way of converting from a @array or @list to a sclar
> var.
It depends on how you want to convert. From the rest of your post,
you want to convert to a single string of all of the values.
> Is this fast enough: ( i mean, in my application @array tends to be
> long in lines and big in memory too). $scalar_var = join ( '',
> @array );
Fast enough? I suppose that depends on your needs. You can use the
Benchmark module to compare various methods of doing this to determine
which is faster, but generally this type of optimization isn't very
useful. Much better is to profile your code and find the
bottle-necks. Often, they aren't where you think they are.
That being said, the method you have suggested is probably the most
common way of doing this.
> And one more question: does this:
> $scalar_var = "@array";
> does this internally:
> $scalar_var = join ( ' ', @array ); #is this 'internally same as
> # doing $scalar_var = "@array"
Almost. It actually does:
$scalar_var = join $", @array;
And $" has a default value of " ".
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Tue, 26 Jun 2001 09:55:04 +0000
From: David J Jackson <cjamblues@qwest.net>
Subject: Curses::ANSIColor Examples
Message-Id: <3B385BF8.3E96E900@qwest.net>
Greetings --
I assigned myself the task(quest) of converting a shell based outage
tracking system to Perl. I've got the basic
query and reporting function done (in Perl). What I need help with is
using Curses module to create an input screen.
Any Takers :)
David Jackson
------------------------------
Date: Mon, 25 Jun 2001 22:54:43 +0530
From: "Aman Patel" <patelnavin@icenet.net>
Subject: Re: fastest way to count lines in a bunch of files.
Message-Id: <9h7s3s$cir3c$1@ID-93885.news.dfncis.de>
> > I know how to count lines conventionally, i would write a method
somewhat
> > like:
>
> "...somewhat like...."? Programming is an exacting art affording
> no leeway for somewhat like nor something like. You either write
> your code correctly or incorrectly.
Hehe, as perl would like to say "there's more than one way to
do it'' (TMTOWTDI, ``tim toady'').
So go and read some FAQ
And i already know that this topic is covered in FAQ, i only wanted to know
the fastest possible way, if someone has already encountered it before, and
my post was in no way telling people to go and test it out themselves, only
if they already know about any performance caveats.
------------------------------
Date: Mon, 25 Jun 2001 18:54:55 +0100
From: "JohnShep" <john@princenaseem.com>
Subject: Graph::BFS parameters
Message-Id: <yWKZ6.3637$A66.75567@NewsReader>
Hi,
The documentation for Graph::BFS is incomplete and does not explain what
parameters it takes. Has anyone got some more info or
any examples of this module they can post ?
Thanks, John
------------------------------
Date: Mon, 18 Jun 2001 11:08:38 -0700
From: Peter <rig01@yahoo.com>
Subject: How can I get rid of lines with garbage in a large file . HELP!!!
Message-Id: <7rgsitkrcnhupe0dsvhsleip4cen46ugih@4ax.com>
Hi :
I have a large file, with garbage inside (some lines have garbage),
How can I get rid of these lines with garbage.
Please help !!! how to do this in Perl?
Thanks in Adavace
Peter
------------------------------
Date: 25 Jun 2001 17:46:10 +0100
From: nobull@mail.com
Subject: Re: How can I get rid of lines with garbage in a large file . HELP!!!
Message-Id: <u9hex44iel.fsf@wcl-l.bham.ac.uk>
Peter <rig01@yahoo.com> writes:
> I have a large file, with garbage inside (some lines have garbage),
> How can I get rid of these lines with garbage.
perl -i -ne 'print unless /pattern_that_matches_garbage/' large_file
See also FAQ: "How do I change one line in a file/delete a line in a
file/insert a line in the middle of a file/append to the beginning of
a file?"
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 25 Jun 2001 10:54:37 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: How can I get rid of lines with garbage in a large file . HELP!!!
Message-Id: <m31yo8a72a.fsf@dhcp9-173.support.tivoli.com>
On Sun, 24 Jun 2001, rig01@yahoo.com wrote:
> I have a large file, with garbage inside (some lines have garbage),
> How can I get rid of these lines with garbage.
perl -ne 'print unless /garbage/' < file > file.new
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 25 Jun 2001 10:35:06 -0700
From: David Wake <dn131@yahoo.com>
Subject: How do I cope with pound (currency) sign?
Message-Id: <m1lmmgh391.fsf@da-nu.com>
I'm parsing some raw HTML from some British websites, and some of them
contain the British pound (currency) sign in their raw HTML. Can
anyone tell me how I could parse this symbol in a regular expression?
Thanks,
David
------------------------------
Date: Mon, 25 Jun 2001 15:07:24 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Newbie - Compare text files
Message-Id: <3b3753ab.6b95$59@news.op.net>
In article <B75CC7D7.837B%plarkinNOSPAM@indeliblelink.com>,
plarkinNOSPAM@indeliblelink.com <plarkinNOSPAM@indeliblelink.com> wrote:
>When I get a new updated file, I'd like to compare it to yesterdays file.
>If a new record was added in the new file, write that line to a "NewRecords"
>file. If the new file is missing a line from the old file, write that line
>to an "RemovedRecords" file. Finally, any record that has changed in any
>way, write that to a "ChangedRecord" file.
I suggest you use the 'diff' program that comes with your computer (if
you have a Unix system) or that you use the 'diff' program supplied
with the Algorithm::Diff module, which you can find at search.cpan.org.
'diff' takes two files and produces a report of which lines have
changed, which lines are new, and which lines have been removed.
I suggest that you sort the old and new versions of the files so that
the lines are in ID number order, before running 'diff', because
otherwise diff will also report on when lines move around inside of
files.
--
@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: Mon, 25 Jun 2001 15:36:53 GMT
From: "plarkinNOSPAM@indeliblelink.com" <plarkinNOSPAM@indeliblelink.com>
Subject: Re: Newbie - Compare text files
Message-Id: <B75CD2D3.8388%plarkinNOSPAM@indeliblelink.com>
in article 3b3753ab.6b95$59@news.op.net, Mark Jason Dominus at
mjd@plover.com wrote on 6/25/01 11:07 AM:
> In article <B75CC7D7.837B%plarkinNOSPAM@indeliblelink.com>,
> plarkinNOSPAM@indeliblelink.com <plarkinNOSPAM@indeliblelink.com> wrote:
>> When I get a new updated file, I'd like to compare it to yesterdays file.
>> If a new record was added in the new file, write that line to a "NewRecords"
>> file. If the new file is missing a line from the old file, write that line
>> to an "RemovedRecords" file. Finally, any record that has changed in any
>> way, write that to a "ChangedRecord" file.
>
> I suggest you use the 'diff' program that comes with your computer (if
> you have a Unix system) or that you use the 'diff' program supplied
> with the Algorithm::Diff module, which you can find at search.cpan.org.
>
> 'diff' takes two files and produces a report of which lines have
> changed, which lines are new, and which lines have been removed.
>
> I suggest that you sort the old and new versions of the files so that
> the lines are in ID number order, before running 'diff', because
> otherwise diff will also report on when lines move around inside of
> files.
Thanks. This is what I initially thought of doing. When I did it, it was a
big mess because of what you said, the files were not sorted. I want to try
it with the files being sorted.
Any suggestions on how to sort?
--
Patrick
------------------------------
Date: Mon, 25 Jun 2001 15:42:22 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Newbie - Compare text files
Message-Id: <3b375bc1.6c45$331@news.op.net>
In article <B75CD2D3.8388%plarkinNOSPAM@indeliblelink.com>,
plarkinNOSPAM@indeliblelink.com <plarkinNOSPAM@indeliblelink.com> wrote:
>Any suggestions on how to sort?
Use the 'sort' command?
--
@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: Mon, 25 Jun 2001 17:45:39 +0200
From: Philip Newton <pne-news-20010625@newton.digitalspace.net>
Subject: Re: Newbie - Compare text files
Message-Id: <o0nejtga9c39gqombvr6qiscm8q85j9h2g@4ax.com>
On Mon, 25 Jun 2001 15:36:53 GMT, "plarkinNOSPAM@indeliblelink.com"
<plarkinNOSPAM@indeliblelink.com> wrote:
> Any suggestions on how to sort?
That rather depends on the file format, wouldn't you agree? :)
It could be numerically by the second space-separated column; or
ASCIIbetically on character columns 18-25 and then a reverse sort by
line length; or pretty much anything. MJD suggested
: hat you sort the old and new versions of the files so that
: the lines are in ID number order
-- what the "ID number" in your case is, you'll have to determine (it
doesn't have to be a number to be a useful sort criterion).
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: 25 Jun 2001 09:10:45 -0700
From: david.w.thomas@intel.com (dwthomas)
Subject: Passing File Handles when using Win32::API
Message-Id: <39127c7e.0106250810.60d6f1df@posting.google.com>
I am trying to import the Win32 method GetFileTime into Perl using the
Win32::API package. One of the parameters is a file handle and it
appears the method does not recognize a Perl file handle. The error
code returned is invalid file handle. Any suggestions?
------------------------------
Date: Mon, 25 Jun 2001 09:55:12 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Perl *is* strongly typed (was Re: Perl description)
Message-Id: <3b376cf0$1@news.microsoft.com>
"David Coppit" <newspost@coppit.org> wrote in message
news:Pine.SUN.4.33.0106242149300.7403-100000@mamba.cs.Virginia.EDU...
> On 22 Jun 2001, Randal L. Schwartz wrote:
>
> > >>>>> "Cristian" == Cristian Cespedes V <ccespede@anakena.dcc.uchile.cl>
writes:
> > No, Perl has strong compile-time typing for primitive data types
> > (scalars, arrays, hashes, filehandles), and strong run-time typing for
> > user-defined data types (but weak compile-time typing).
>
> True enough, but that's not enough to say that Perl has strong typing.
> What about string versus numeric types?
Well, there is no data type "string" and no data type "numeric/int/real/" in
Perl to begin with. In so far your statement (as true as it is) is beside
the point.
jue
------------------------------
Date: Mon, 25 Jun 2001 18:24:59 +0200
From: "H. Merijn Brand" <h.m.brand@hccnet.nl>
To: comp.lang.perl.misc
Subject: Re: perl compilation on HPUX-11
Message-Id: <Xns90CBBB57728B7Merijn@192.0.1.90>
Sandeep Grover <sgrover@delsoft.com> wrote in
news:3B3730B1.2B64B5FA@delsoft.com:
> I need to install Perl on HPUX-11, 64-bit operating system as we have to
> build our software on the HPUX-11, that software uses Perl internally. Is
> the Perl's latest version 64-bit compliant?
5.6.1 not yet. 5.8.0 (comming out very soon now) is, as is the develoment
release 5.7.1
> Can I get the config.sh to compile the Perl on HPUX-11 in 64-bit mode?
# Configure -Duse64bitall -des
> Another problem is I don't have ANSI C compiler on this machine. Is it
> possible to compile Perl successfully using HP's native compiler aCC(C++
> Compiler) in 64-bit mode?
HP's native compiler is *not* the same as aCC! You *cannot* build perl with
that native compiler (which is only suited for rebuilding the kernel and
compiling "Hello world".
Perl *does* need a full ANSI C-compiler. I think aCC is such a compiler, but
I'm not sure, cause I don't have it.
> I tried to compile Perl Version 5.5003 on HPUX-10 using g++ compiler but
> it could not compile ext/ODBM_File/ODBM_File.xs. It says that the implicit
> declaration functions of dbminit() and store(). Is there any solution for
> this problem?
We're working on a transparant gcc port for HP-UX 11.00, but more of those
problems like you describe pop up on a regular basis. There ain't no standard
solution for this yet.
> regards,
If you've got some bandwidth left, visit for a fully functional 64bit GNU
development environment:
http://devresource.hp.com/OpenSourcebin/hppa2.0w-hp-hpux11.00.tar.Z (88 Mb)
It's possible to build a working 64bitall perl in this environment, but some
tests still fail. It's up to you to decide if it's enough.
For the moment, we advice you to use HP ANSI-C compiler if available.
--
H.Merijn Brand Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 626 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
------------------------------
Date: 25 Jun 2001 17:35:12 +0100
From: nobull@mail.com
Subject: Re: Perl script from cron being mysteriously killed. Any ideas?
Message-Id: <u9k8204iwv.fsf@wcl-l.bham.ac.uk>
thoennes@pingsite.com (Frank) writes:
> We have a cron that executes a shell script that executes a perl
> script every hour. There are times when the perl script may take over
> an hour to complete processing (it does lots of DB queries and also
> sends out emails via sendmail). We've noticed that if the script
> can't complete by the time the cron fires for the next hourly run, the
> script is "killed" and the new instance started. (This is verified
> through a log file).
Why do you think the fact that the script is written in Perl is likely
to be a significant factor in the behaviour of cron?
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 25 Jun 2001 09:48:32 -0700
From: m_musgrove@yahoo.com (Michael M.)
Subject: perl script worked on redhat 6 but not 7.x
Message-Id: <b8c6b4d.0106250848.1d303cf4@posting.google.com>
This script is not working on RedHat 7.x. It worked fine on version
6.x.
The error I am receiving when running it at the command prompt is:
Missing braces on \N{} at ./chatplace2backup.cgi line 85, within
string
Execution of ./chatplace2backup.cgi aborted due to compilation errors.
If anyone could help me out I would really appreciate it. I am
unfortunately not a programmer. :(
#!/usr/bin/perl
print "Content-type: text/html\n\n";
require "chat-vars.lib";
####################################################################
&parse_form;
$searchstring = $FORM{'searchstring'};
$chatsys = $FORM{'chatsys'};
$room = $FORM{'room'};
$username = $FORM{'username'};
&checkusers;
sub checkusers {
$allem = 0;
$directory = "$basenetworkdir/systems/$FORM{'chatsys'}/$FORM{'room'}/users";
opendir(DIR1,$directory);
@tmp1 = grep(!/^\.\.?$/, readdir(DIR1));
foreach (@tmp1) {
push(@files1,$_);
}
close(DIR1);
foreach(sort(@files1)) {
$key1 = $_; #substr($_,0,-4);
if ($key1 ne "message") {
$allem++;
}
}
open(FILE6,"$basenetworkdir/systems/$FORM{'chatsys'}/$FORM{'room'}/maxusers")
|| &theframes;
@LINES6 = <FILE6>;
close(FILE6);
foreach $LINE6 (@LINES6)
{
if ($allem < $LINE6) {
&theframes;
}
else {
if ($allem > $LINE6) {
if ($FORM{'capass'} ne "") {
open(FILE16,"$basenetworkdir/systems/$FORM{'chatsys'}/adminpass.txt");
@LINES16 = <FILE16>;
close(FILE16);
foreach $LINE16 (@LINES16)
{
if ($FORM{'capass'} eq $LINE16) {
&theframes;
}
else {
&sorry;
}
}
}
else {
&sorry;
}
sub sorry {
print "Content-type: text/html\n\n";
print "<html>";
$msg = "Sorry, this room is FULL! ( $LINE6 users allowed )";
&alertit;
print " <<--------------------------------------------**LINE 85**
<script language=\"\javascript\"\>
<!--
var remote = null;
function remoteStart() {
remote = window.open('', 'chatRemote1',
'width=400,height=400,resizable=yes');
if (remote != null) {
if (remote.opener == null)
remote.opener = self;
remote.location.href = 'http://www.2cp.com/hangout/index2.html';
}
}
------------------------------
Date: Mon, 25 Jun 2001 09:50:47 -0700
From: The Small Kahuna <person@company.com>
Subject: Re: perl Tk::DragDrop (comp.lang.perl.tk has not responded)
Message-Id: <3B376BE7.B7E92527@company.com>
Benjamin Goldberg wrote:
>
> While this has little or nothing to do with your problem, I'd like to
> know why you use all global variables, not lexicals. Also, if you used
> warnings, you would realize that $text is only assigned to, and never
> used again. Also, your use of $f and $f1 seems odd... you only use the
> immediately after they're assigned to, and never again. I would have
> written the program as follows:
While your criticism of a piece of example code I got off the web
(because the documentation of the DragDrop module is virtually
non-existent) that I hacked up just to provide a short example that
reproduces the problem (thus solving a justified critism often heard in
this group of the lack of posted source code) is accurate and I agree
with all of your points, I would like to ask one question:
Do you have any suggestions that actually relate to the post?
>
> #! perl -w
> use Tk;
> use Tk::DragDrop;
> use Tk::DropSite;
> use strict;
>
> my $dnd_token;
> WINDOW_1 : {
> my $top = MainWindow->new;
> $top->Label(-text =>
> "Drag items from the left listbox to the right one"
> )->pack;
> my $lb = $top->Frame->pack->Scrolled('Listbox',
> -scrollbars => "osoe", -selectmode => 'extended'
> )->pack(-side => "left");
> $lb->insert("end", sort keys %ENV);
> $dnd_token = $lb->DragDrop (
> -event => '<B1-Motion>',
> -sitetypes => ['Local'],
> -startcommand => sub {
> my $token = $dnd_token;
> my $w = $token->parent; # $w is the source listbox
> my $e = $w->XEvent;
> my $idx = $w->nearest($e->y);
> # get the listbox entry under cursor
> return unless defined $idx;
> # Configure the dnd token to show the listbox entry
> $token->configure(-text => $w->get($idx));
> # Show the token
> my($X, $Y) = ($e->X, $e->Y);
> $token->MoveToplevelWindow($X, $Y);
> $token->raise;
> $token->deiconify;
> $token->FindSite($X, $Y, $e);
> } );
> } # end WINDOW_1 block.
> WINDOW_2 : {
> my $top = MainWindow->new;
> $top->Scrolled('Text')->pack(
> -side=>'top', -expand=>1, -fill=>'both');
> my $lb = $top->Frame->pack->Scrolled('Entry',
> -scrollbars => "osoe")->pack(-side => "left");
> $lb->DropSite (
> -droptypes => ['Local'],
> -dropcommand => [ sub {
> $_[0]->insert("end", $_[1]->cget(-text));
> }, $lb, $dnd_token ] );
> } # end WINDOW_2 block.
>
> MainLoop;
> __END__
>
> Note that this code is untested.
>
> --
> The longer a man is wrong, the surer he is that he's right.
------------------------------
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.
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 1189
***************************************