[29109] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 353 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 17 09:10:12 2007

Date: Tue, 17 Apr 2007 06:09:11 -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           Tue, 17 Apr 2007     Volume: 11 Number: 353

Today's topics:
    Re: [OT] Re: is laziness a programer's virtue? <bik.mido@tiscalinet.it>
    Re: Absolute Path errors <nikos1337@gmail.com>
        adding an excel worksheet to a generetad excel file via FlorianKraft@gmx.de
    Re: adding an excel worksheet to a generetad excel file <wahab-mail@gmx.de>
    Re: Error connecting to remote database anno4000@radom.zrz.tu-berlin.de
    Re: Error connecting to remote database <nikos1337@gmail.com>
    Re: Error connecting to remote database anno4000@radom.zrz.tu-berlin.de
    Re: Error connecting to remote database <nikos1337@gmail.com>
    Re: How to time out a forked command but still see outp <hokkaidocrow@gmail.com>
    Re: is laziness a programer's virtue? <quetzalcotl@consultant.com>
    Re: is laziness a programer's virtue? <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
    Re: is laziness a programer's virtue? <wahab-mail@gmx.de>
    Re: looking for some size optimization <nospam-abuse@ilyaz.org>
    Re: looking for some size optimization anno4000@radom.zrz.tu-berlin.de
    Re: UTF16 input file to ISO-8859-1 output <nobull67@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 17 Apr 2007 13:02:05 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: [OT] Re: is laziness a programer's virtue?
Message-Id: <86a923hn1t66tc6i0bfromoufr4jkcarm0@4ax.com>

On Mon, 16 Apr 2007 17:58:52 -0400, D Herring
<dherring@at.tentpost.dot.com> wrote:

>- Please topquote snippets from the threads about which you are commenting.
>
>- Please set your newsreader to prepend "Re: " or somesuch when replying 
>to a toplevel post.
>
>- Please don't preach about "meta-talk and policing" in a post which is 
>mostly meta-talk and preaching.

FYI "Please" is probably a word that XL ignores completely. Thus do
what most humans in their sane state of mind would do. Killfile it. If
for some reason you can't, then ignore it. Certainly, do not feed it.


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: 17 Apr 2007 03:42:26 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Absolute Path errors
Message-Id: <1176806546.285819.301020@b58g2000hsg.googlegroups.com>

On Apr 17, 5:20 am, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> skieros wrote:
> > But i guess thats all a trick to get us to pay for your hosting isnt?
>
>       ^          ^^                                                 ^^
>
> > So ill never be abel to see the access an s error logs.
>
>      ^^^          ^^^^                   ^^^^
>
> > Any other goog hostinf plans gys?
>
>             ^^^^^^^^^^^^^^^^^^^^^^
>
>
>
> > ill try the document root env var now in my localhost and tell you if
>   ^^^
> > it works.
>
> Your postings are exceedingly difficult to read. While I understand that
> English may not be your first language or that you may suffer from any
> number of reading/writing impairments unfortunately that doesn't make your
> articles any easier to decipher for the rest of us.
> Luckily there is a very easy way to eliminate at least a large chunk of
> misspellings and typos: just run your text through a spell checker before
> hitting the send button. It won't resolve 100% of issues, but probably ca=
tch
> 90% or so and that would be a VERY MAJOR improvement.
>
> jue

I never uses a spell checker before, but ill try it if you tell me
one, iam posting this through browser on grous.google.is there an
online check before i hit send maybe? that would be very convinient

Well sorry for my posts but ysterday i accidentally spit all coffe to
keyboard anbd wasnt even be able to hist space button. keyborad typed
also on its own ue to stickness.

All worked!! it ried it myself before eeing your ansers.

my @tips;
open FILE, "<$ENV{'DOCUMENT_ROOT'}/data/text/tips.txt" or die $!;
     @tips =3D <FILE>;
close FILE;
works fine!

and also

my @files =3D glob "$ENV{'DOCUMENT_ROOT'}/data/text/*.txt"; #worked fine

and also this!

#=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=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
my $db =3D ( $ENV{'SERVER_NAME'} !~ /freehostia/ )
       ? DBI->connect('DBI:mysql:nikos_db', 'root', '********',
{RaiseError=3D>1})
       : DBI->connect('DBI:mysql:nikkou6_db:mysql3.freehostia.com',
'nikkou6_db', '********', {RaiseError=3D>1});
#=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=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 CREATE DATABASE AND TABLES
=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
my $dbname=3D'nikos_db'  if( $ENV{'SERVER_NAME'} !~ /freehostia/ ) or my
$dbname=3D'nikkou6_db';

$db->do( "DROP DATABASE IF EXISTS $dbname" );
$db->do( "CREATE DATABASE $dbname" );
$db->do( "USE $dbname" );

EVERYTHING WORKED!

FUNNY THING WAS THAT I HAD TO copy/paste <space> and other chars as
well and delete everythign the keyboard wrote by it self!!



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

Date: 17 Apr 2007 05:38:49 -0700
From: FlorianKraft@gmx.de
Subject: adding an excel worksheet to a generetad excel file via perl
Message-Id: <1176813529.720110.30370@l77g2000hsb.googlegroups.com>

Hi,

I'm currently working an a solution for exporting data from an oracle
database into an excel file, which is produced daily und therefore
kept up-to-date.

The solution works nice, the file is exported evey day with correct
data - but there's a small flaw. For the usage of this data a
disclaimer is provided as an extras excel worksheet within the
workbook - the problem is, that currently every small change (e.g.
management, contact, etc.) mut be implemented as a series of functions
bulding up the extra sheet and adding it to the gernerated file - it
thereby feels as if one has to do it manually all the time, which
requires some unterstanding of the code as well as time, as the
disclaimer data often changes in its measures (cell widths, etc.)

I now had the idea to change this system, allowing normal users to
easily access the disclaimer and thereby stop punishing me with
senseless extra work for every small change. Therefore i made an extra
Excel file, containing just the disclaimer so it could be easy for
anyone to change it.

The problem now is - how do i add such a file as an extra worksheet? i
tried some things up to now - which involves completely parsing it via
Spreadsheet::ParseExcel, spllitting up the data in an array and a hash
(cell contens and cell formats) an then trying to rewrite it via
Spreadsheet::WriteExcel. It seems somehow incompatble when writing the
data read (as it is somehow complicated to find out backgroundcolours,
internal graphics, cell-merging, and so on)

I do not have the option of another module (Win32::OLE will not work
due to the fact that i just have a Linux System) nor do i have the
time for a complete rewrite of the original code of the export script.

So does anyone have an idea how to read a single worksheet of an
existing excel file (e.g. disclaimer.xls) and adding it into a
generated one?

thanks,

florian



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

Date: Tue, 17 Apr 2007 14:53:22 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: adding an excel worksheet to a generetad excel file via perl
Message-Id: <f02gba$kso$1@mlucom4.urz.uni-halle.de>

FlorianKraft@gmx.de wrote:
> [a] disclaimer is provided as an extras excel worksheet within the
> workbook - the problem is, that currently every small change (e.g.
> management, contact, etc.) mut be implemented as a series of functions
> bulding up the extra sheet and adding it to the gernerated file - it
> thereby feels as if one has to do it manually all the time, which
> requires some unterstanding of the code as well as time, as the
> disclaimer data often changes in its measures (cell widths, etc.)
> 
> I now had the idea to change this system, allowing normal users to
> easily access the disclaimer and thereby stop punishing me with
> senseless extra work for every small change. Therefore i made an extra
> Excel file, containing just the disclaimer so it could be easy for
> anyone to change it.
> 
> The problem now is - how do i add such a file as an extra worksheet? i
> tried some things up to now - which involves completely parsing it via
> Spreadsheet::ParseExcel, spllitting up the data in an array and a hash
> (cell contens and cell formats) an then trying to rewrite it via
> Spreadsheet::WriteExcel. It seems somehow incompatble when writing the
> data read (as it is somehow complicated to find out backgroundcolours,
> internal graphics, cell-merging, and so on)

Of course I don't know all of the complexities
involved with your xls report generation, but
here's how I'd do that ...

You said the problem is some "small other excel file"
with necessary extra data - that gets updated occasionally?

An excel table is in most cases 'a table'. Therefore, I'd
write a small Perl script that reads the 'extra file' at
times and puts it into a new table of the main db (oracle
or whatever) if something changed.

On generation of the "real report" xls, I'd just 'select'
the data together with the real data and put each in its
place in the generated file.

Don't know if that would work in your case,

Regard

M.


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

Date: 17 Apr 2007 10:23:59 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Error connecting to remote database
Message-Id: <58jlhvF2h31l3U1@mid.dfncis.de>

skieros <nikos1337@gmail.com> wrote in comp.lang.perl.misc:
> On Apr 17, 12:41 am, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
> wrote:

> > The browser displays "Can't locate DBI.pm in @INC (@INC contains: ..."
> > This is because I moved the `use CGI::Carp`  before the `use DBI` (which
> > isn't installed).
> >
> > You can install Apache on your WinXP PC and test your CGI scripts that
> > way. At least you'll have access to error logs :-)
> 
> Yes i use dbi.pm. the .way .you .describe.
> 
> and no error .displayed,why3?

Your exasperation is misdirected.

What RedGrittyBrick is trying to get through to you is that it's
your task to provide more information about what's happening.  All
we can do is make guesses, which has availed nothing.  So find out
how to access the error logs on your server.  If that doesn't clear
things up for you, post the error message(s) and we'll see what we
can do.

Anno


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

Date: 17 Apr 2007 03:31:10 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Error connecting to remote database
Message-Id: <1176805870.302877.216120@o5g2000hsb.googlegroups.com>

On Apr 17, 1:23 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> skieros <nikos1...@gmail.com> wrote in comp.lang.perl.misc:
>
> > On Apr 17, 12:41 am, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
> > wrote:
> > > The browser displays "Can't locate DBI.pm in @INC (@INC contains: ..."
> > > This is because I moved the `use CGI::Carp`  before the `use DBI` (wh=
ich
> > > isn't installed).
>
> > > You can install Apache on your WinXP PC and test your CGI scripts that
> > > way. At least you'll have access to error logs :-)
>
> > Yes i use dbi.pm. the .way .you .describe.
>
> > and no error .displayed,why3?
>
> Your exasperation is misdirected.
>
> What RedGrittyBrick is trying to get through to you is that it's
> your task to provide more information about what's happening.  All
> we can do is make guesses, which has availed nothing.  So find out
> how to access the error logs on your server.  If that doesn't clear
> things up for you, post the error message(s) and we'll see what we
> can do.
>
> Anno

Good news folks!

They tolm me that on free palns i will not be able to have access to
errro and access logs but they point the error.

My damn Gridinsoft Notepad ib=3Dnsreted a bom header on top of all my
perl vgi scritps that i have saves as utf-8.

this to be exact: A?A=BBA?#!/usr/bin/perl -w

So when i uploaded thee server on freehostia coulsnt understand this
is a perl file thats why i got a premature display errors.

When is aved my scripts as windows encoding and uploded allorked fine.
check 4yourslef: skieros.freehostia.com :-)

Whats troubles me though is with the same utf-8 encofing my webpage
was loaded fine in localhost.



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

Date: 17 Apr 2007 10:34:04 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Error connecting to remote database
Message-Id: <58jm4sF2h31l3U2@mid.dfncis.de>

 <anno4000@radom.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
> skieros <nikos1337@gmail.com> wrote in comp.lang.perl.misc:
> > On Apr 17, 12:41 am, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
> > wrote:
> 
> > > The browser displays "Can't locate DBI.pm in @INC (@INC contains: ..."
> > > This is because I moved the `use CGI::Carp`  before the `use DBI` (which
> > > isn't installed).
> > >
> > > You can install Apache on your WinXP PC and test your CGI scripts that
> > > way. At least you'll have access to error logs :-)
> > 
> > Yes i use dbi.pm. the .way .you .describe.
> > 
> > and no error .displayed,why3?
> 
> Your exasperation is misdirected.
> 
> What RedGrittyBrick is trying to get through to you is that it's
> your task to provide more information about what's happening.  All
> we can do is make guesses, which has availed nothing.  So find out
> how to access the error logs on your server.  If that doesn't clear
> things up for you, post the error message(s) and we'll see what we
> can do.

If your provider doesn't give you access to the logs (as seems to be
the case), change the provider.  You don't have a chance to get anything
significant up and running under these conditions.

Anno


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

Date: 17 Apr 2007 03:49:37 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Error connecting to remote database
Message-Id: <1176806977.792045.224910@p77g2000hsh.googlegroups.com>

On Apr 17, 1:34 pm, anno4...@radom.zrz.tu-berlin.de wrote:
>  <anno4...@radom.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
>
>
>
> > skieros <nikos1...@gmail.com> wrote in comp.lang.perl.misc:
> > > On Apr 17, 12:41 am, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
> > > wrote:
>
> > > > The browser displays "Can't locate DBI.pm in @INC (@INC contains: ..."
> > > > This is because I moved the `use CGI::Carp`  before the `use DBI` (which
> > > > isn't installed).
>
> > > > You can install Apache on your WinXP PC and test your CGI scripts that
> > > > way. At least you'll have access to error logs :-)
>
> > > Yes i use dbi.pm. the .way .you .describe.
>
> > > and no error .displayed,why3?
>
> > Your exasperation is misdirected.
>
> > What RedGrittyBrick is trying to get through to you is that it's
> > your task to provide more information about what's happening.  All
> > we can do is make guesses, which has availed nothing.  So find out
> > how to access the error logs on your server.  If that doesn't clear
> > things up for you, post the error message(s) and we'll see what we
> > can do.
>
> If your provider doesn't give you access to the logs (as seems to be
> the case), change the provider.  You don't have a chance to get anything
> significant up and running under these conditions.
>
> Anno

Well freehostia is considered to be the best free hosting provider,
they also tol me to net hesitate to ask them again if i have a similar
problem, but i still wont be able to read the access and error
log.....

Sorry, for yesteraday i want exasperating it was my keyboard driving
nuts after accidentally spitted coffe on it as i mentioned few minutes
ago on my another post! :-)



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

Date: 17 Apr 2007 05:17:05 -0700
From: thecrow <hokkaidocrow@gmail.com>
Subject: Re: How to time out a forked command but still see output?
Message-Id: <1176812225.674096.146890@d57g2000hsg.googlegroups.com>

Thanks for the reply.   This worked somewhat for me because I wasn't
looking to redirect to a file within the perl script itself... the
wrapper can do that.

I found that I had to add a SIGCHLD handler to break the loop.  Also,
for stuff that sends unbuffered output, I couldn't use while (<CMD>),
instead I had to use sysread.   I just love those helpful programs
that send "status dots" with no carriage return and no way to disable
them  :(

In my new solution it still doesn't grab the last chunk of output
until the external prog finishes, so I'm going to look at what you've
posted and see if there are any improvements to be had there.

Thanks...

On Apr 16, 7:14 pm, "attn.steven....@gmail.com"
<attn.steven....@gmail.com> wrote:
> On Apr 16, 3:51 pm, xhos...@gmail.com wrote:
>
> > That doesn't seem do what you said you want.  It doesn't redirect
> > to a file and let child finish sending output there.
>
> I started to play with the close-on-exec flag and
> had the signal handler exec to a new process:
>
> my $fh;
> my @output;
> eval {
>     local $SIG{'ALRM'} = sub {
>         close $fh;
>         exec("finish_at_your_leisure");
>     };
>
>     alarm 15;
>     local $^F = 3;
>     open(CMD, "slow_process|")
>         or die "Cound not open pipe: $!";
>     open $fh, '>', '/tmp/save'
>         or die "Could not open file : $!";
>     my $old_fh = select($fh);
>     $| = 1;
>     select($old_fh);
>     while (<CMD>)
>     {
>         push @output, $_;
>         print $fh $_;
>     }
>     alarm 0;
>     print "Command completed, output is:\n";
>     print $_ for @output;
>
> };
>
> die "$@" if $@;
>
> Where finish_at_your_leisure was something like:
>
> open my $fh, '>>', '/tmp/save'
>     or die $!;
>
> open (CMD, '<&=3')
>     or die "fdopen equivalent failed: $!";
>
> while (<CMD>)
> {
>     print $fh $_;
>
> }
>
> close $fh;
>
> It seems to work but I don't usually
> work with signal handlers and frankly having
> anything complex in them gives me an uneasy
> feeling.
>
> --
> Hope this helps,
> Steven




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

Date: 17 Apr 2007 01:12:38 -0700
From: Ingo Menger <quetzalcotl@consultant.com>
Subject: Re: is laziness a programer's virtue?
Message-Id: <1176797558.403629.53140@b75g2000hsg.googlegroups.com>

On 16 Apr., 23:01, "Xah Lee" <x...@xahlee.org> wrote:

> If your article is relevant to X, Y, and Z,
> please cross post it.

Yeah right, and if it is not, don't post it at all. Your articles are
nothing but a bunch of unfounded allegations, moralism and your
personal notion of what alledgedly "hurts society". As such, they have
no relevance at all in technical news groups.



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

Date: Tue, 17 Apr 2007 12:33:23 +0200
From: Markus E Leypold <development-2006-8ecbb5cc8aREMOVETHIS@ANDTHATm-e-leypold.de>
Subject: Re: is laziness a programer's virtue?
Message-Id: <h01wijqoi4.fsf@hod.lan.m-e-leypold.de>


Ingo Menger <quetzalcotl@consultant.com> writes:

> On 16 Apr., 23:01, "Xah Lee" <x...@xahlee.org> wrote:
>
>> If your article is relevant to X, Y, and Z,
>> please cross post it.
>
> Yeah right, and if it is not, don't post it at all. Your articles are
> nothing but a bunch of unfounded allegations, moralism and your
> personal notion of what alledgedly "hurts society". As such, they have
> no relevance at all in technical news groups.

But we already had of topic discussions in some of those groups
(meandering into the non technical) that weren't stomped upon by the
group's subscribers. The difference in my eyes is, that Xah is a
troll. What makes Xah a troll is neither off-topic posts nor being
incoherent -- its the attitude. He's broadcasting his drivel to a
number of groups not with the intention to discuss (he hardly ever
answers to answers to his posts), but solely with the intention to
inform the world at large about his own magnificient thoughts. As also
evidenced by reposting some of his stuff (as if he had a fan community
or as if it were a FAQ) or posting stuff dated from 2002.

Trying to correct Xah's behaviour is probably impossible. People who
publish pictures of themselves as he does on the WWW probably don't
have any sense of embarrasment left -- and I consider that a necessary
part in the feedback loop which makes people change: "Look what you
did! Do you really want to look like a dolt in public?" "Umpf. No. God
that was embarrasing" <goes away with the resolution not to get into
such a situation again>.

But that won't happen to Xah.

Regards -- Markus




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

Date: Tue, 17 Apr 2007 12:52:34 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: is laziness a programer's virtue?
Message-Id: <f0298r$ir3$1@mlucom4.urz.uni-halle.de>

Markus E Leypold wrote:
> Trying to correct Xah's behaviour is probably impossible. People who
> publish pictures of themselves as he does on the WWW probably don't
> have any sense of embarrasment left ...

you think of stuff like this
     www DOT m-e-leypold DOT de SLASH leypold-small.jpg
;-)

>                                  -- and I consider that a necessary
> part in the feedback loop which makes people change: "Look what you
> did! Do you really want to look like a dolt in public?" "Umpf. No. God
> that was embarrasing" <goes away with the resolution not to get into
> such a situation again>.

The reason why I answered your posting at all (besides
seeing your x-post going into 5 ng's) is your mentioning
of 'God'. According to christian tradition (which is
somehow on topic in a Perl group) it is exactly the
case of Jesus (imho), who was (in his context) the
"/Do you really want to look like a dolt in public/"
man par excellance. Socrates also comes into the mind ;-)

AFAIK - both were symptoms of the decline
of their societies at the time ...

Regards & sorry for scnr'ing

Mirco

remember - f'up to: comp.lang.perl.misc


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

Date: Tue, 17 Apr 2007 10:44:54 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: looking for some size optimization
Message-Id: <f028f6$2hll$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Uri Guttman 
<uri@stemsystems.com>], who wrote in article <x7odln4zci.fsf@mail.sysarch.com>:
>   ME> Assuming I have initially $all_conflict->{$file} corresponding to
>   ME> $r = [$pkgname1, $pkgname2], then I will try to build
>   ME> $pkg_list->{$r}->{$pkgname3} = [$pkgname1, $pkgname2, $pkgname3] as a
>   ME> unique new reference.

> yes, you can do that. 
> 
> i need to grok the conflict logic. my gut says there is a much better
> structure out there and i trust it well.

Likewise here.  To the OP: we MUST know what kind of information one
must have AT THE END, and what is the "elementary event" which
triggers update of the info.  [Also, some stats of the state at the
end are also useful.]

Hope this helps,
Ilya


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

Date: 17 Apr 2007 11:23:27 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: looking for some size optimization
Message-Id: <58jp1fF2hd2j5U1@mid.dfncis.de>

Ilya Zakharevich  <nospam-abuse@ilyaz.org> wrote in comp.lang.perl.misc:
> [A complimentary Cc of this posting was sent to
> Uri Guttman 
> <uri@stemsystems.com>], who wrote in article <x7odln4zci.fsf@mail.sysarch.com>:
> >   ME> Assuming I have initially $all_conflict->{$file} corresponding to
> >   ME> $r = [$pkgname1, $pkgname2], then I will try to build
> >   ME> $pkg_list->{$r}->{$pkgname3} = [$pkgname1, $pkgname2, $pkgname3] as a
> >   ME> unique new reference.
> 
> > yes, you can do that. 
> > 
> > i need to grok the conflict logic. my gut says there is a much better
> > structure out there and i trust it well.
> 
> Likewise here.

With lots of filenames and their common prefixes, a trie comes to mind.

Anno


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

Date: 17 Apr 2007 01:19:09 -0700
From: Brian McCauley <nobull67@gmail.com>
Subject: Re: UTF16 input file to ISO-8859-1 output
Message-Id: <1176797949.418721.89000@l77g2000hsb.googlegroups.com>

On Apr 16, 2:56 pm, R Wood <r...@therandymon.com> wrote:
> I Googled Perl UTF8 and read the relevant chapter in the Llama, and read
> perlrun and perlunicode as well, but at this point I am frankly over my
> head.  How can I embed something into this script that will make perl
> understand it will receive UTF16 characters?

> while ( <> )

You are using the magic ARGV filehandle so you need to precede this
with:

use open IN => ':encoding(utf16)'; # Default all open()s to UTF16
use open ':std'; # STDIN too, in case you use the script in pipeline
mode

For details, see "perldoc open"



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

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 V11 Issue 353
**************************************


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