[19175] in Perl-Users-Digest
Perl-Users Digest, Issue: 1370 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 24 14:10:44 2001
Date: Tue, 24 Jul 2001 11:10:19 -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: <995998219-v10-i1370@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 24 Jul 2001 Volume: 10 Number: 1370
Today's topics:
open w/ pipe not working <mdulrich@unity.ncsu.edu>
Re: open w/ pipe not working <peb@bms.umist.ac.uk>
Re: open w/ pipe not working (Gary E. Ansok)
Re: opendir(), glob(): 2 or more dots in file names <Thomas@Baetzler.de>
Re: opendir(), glob(): 2 or more dots in file names nobull@mail.com
Re: print "Content-type: image/gif\n\n" and then??? (Caribe1999)
Re: Running the same scripts of different platforms nobull@mail.com
Re: scope for recursive sub (Anno Siegel)
Re: scope for recursive sub <skilchen@swissonline.ch>
Re: Sorting an array of strings by 'closeness' to anoth <weiss@kung.foo.at>
Re: Sorting an array of strings by 'closeness' to anoth <jasper@guideguide.com>
Re: Sorting an array of strings by 'closeness' to anoth <me@my_no_spam.org>
Re: Sorting an array of strings by 'closeness' to anoth <jpixton@dircon.co.uk>
Re: Splitting Peculiar HTML <Tassilo.Parseval@post.rwth-aachen.de>
Re: Splitting Peculiar HTML <bart.lateur@skynet.be>
Re: Splitting Peculiar HTML (Bill Atkins)
Re: Splitting Peculiar HTML (Bill Atkins)
Re: Upgrade Perl on RH7.1 From Source <gerard@NOSPAMlanois.com>
Re: What am I doing wrong? Help. <james@zephyr.org.uk>
Re: where is the "standard library" <seandarcy@hotmail.com>
Re: where is the "standard library" (Anno Siegel)
Windows <lance@chatwell.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 24 Jul 2001 10:42:32 -0400
From: Marc Ulrich <mdulrich@unity.ncsu.edu>
Subject: open w/ pipe not working
Message-Id: <3B5D8958.B330DD83@unity.ncsu.edu>
When I open a file using a the pipe (|) option, Instead of directing the
output to my handle, it goes to standard output. How can I fix this?
Here's my code snippet:
open(rawdatafile, "|tac $ARGV[0]") or die "I cannot tac $ARGV[0].\n";
$beamflux = <rawdatafile>;
close(rawdatafile);
where $ARGV[0] is a filename. The output of this code is that the file
is listed backward to standard output and $beamflux is NULL instead of
the last line of the file.
How do I get the redirection working?
I'm using Perl 5.6 on Redhad 7.0 w/ 2.4.2 kernel.
Thanks,
Marc
------------------------------
Date: Tue, 24 Jul 2001 17:33:40 +0100
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: open w/ pipe not working
Message-Id: <3B5DA364.C9C2EBDD@bms.umist.ac.uk>
Marc Ulrich wrote:
>
> When I open a file using a the pipe (|) option, Instead of directing the
> output to my handle, it goes to standard output. How can I fix this?
>
> Here's my code snippet:
> open(rawdatafile, "|tac $ARGV[0]") or die "I cannot tac $ARGV[0].\n";
> $beamflux = <rawdatafile>;
> close(rawdatafile);
>
> where $ARGV[0] is a filename. The output of this code is that the file
> is listed backward to standard output and $beamflux is NULL instead of
> the last line of the file.
I have to assume that you are expecting the "| tac $ARGV[0]" to open as
if it was an input file. You've just got the pipe in the wrong place.
Try
#!/usr/bin/perl -w
use strict;
open(RAWDATAFILE, "tac $ARGV[0] |") or die "couldn't open $ARGV[0] :
$!";
my $beamflux = <RAWDATAFILE>;
close RAWDATAFILE;
HTH
Paul
p.s. if all you want is the last line of the file, why not use
my $beamflux = `tail -1 $ARGV[0]`;
------------------------------
Date: 24 Jul 2001 16:50:16 GMT
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: open w/ pipe not working
Message-Id: <9jk908$qe1@gap.cco.caltech.edu>
In article <3B5D8958.B330DD83@unity.ncsu.edu>,
Marc Ulrich <mdulrich@unity.ncsu.edu> wrote:
>When I open a file using a the pipe (|) option, Instead of directing the
>output to my handle, it goes to standard output. How can I fix this?
>
>Here's my code snippet:
>open(rawdatafile, "|tac $ARGV[0]") or die "I cannot tac $ARGV[0].\n";
>$beamflux = <rawdatafile>;
>close(rawdatafile);
Your open() call would be suitable if you were going to write data
to the pipe (to be read by tac). Since you're reading from the pipe,
put it at the other end.
Think of the Unix shell command line: "tac file | myprog" is a much
better match for what you want to do than "myprog | tac file", so use
"tac file |" in your open() call.
As a general rule, it's a very good idea to check the status of
close() calls on pipe handles, even if you're just reading from them.
Many errors (almost all, in fact) are not detected by the open() call,
and will be included in $? after the return from close(). For example,
if the "tac" program was missing, you might not find out about it until
the close(). There's a section in perlfaq8 with more on this.
-- Gary Ansok
------------------------------
Date: Tue, 24 Jul 2001 17:55:49 +0200
From: =?ISO-8859-1?Q?Thomas_B=E4tzler?= <Thomas@Baetzler.de>
Subject: Re: opendir(), glob(): 2 or more dots in file names
Message-Id: <8i6rltsg8vq1kahqeu6u7elcuuudnu79h7@4ax.com>
On Tue, 24 Jul 2001 15:37:19 +0200, "onet"
<rczuba@merkury.wsiz.rzeszow.pl> wrote:
>Can you help me I want to know why opendir, or glob don't read file names
>with 2 or more dots.
[...]
Which Perl and what hardware?
I could not verify any problems with Perl 5.6.1 on Win32 and Linux.
HTH,
--
Thomas Baetzler - http://baetzler.de/ - Clan LoL - http://lavabackflips.de/
I am the "ILOVEGNU" signature virus. Just copy me to your signature.
This post was infected under the terms of the GNU General Public License.
------------------------------
Date: 24 Jul 2001 18:05:31 +0100
From: nobull@mail.com
Subject: Re: opendir(), glob(): 2 or more dots in file names
Message-Id: <u9y9pemf50.fsf@wcl-l.bham.ac.uk>
"onet" <rczuba@merkury.wsiz.rzeszow.pl> writes:
> Can you help me I want to know why opendir, or glob don't read file names
> with 2 or more dots.
>
> If we have a list of files in direcotry e.g. "sys:directory"
> fi.le1.txt
> file2.txt
Is this VMS?
IIRC all filenames on VMS must contain precisely one dot.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 24 Jul 2001 08:16:08 -0700
From: selfesteem@virgilio.it (Caribe1999)
Subject: Re: print "Content-type: image/gif\n\n" and then???
Message-Id: <311fec9b.0107240716.6c276160@posting.google.com>
selfesteem@virgilio.it (Caribe1999) wrote in message news:<311fec9b.0107230301.7d7d51ec@posting.google.com>...
> If I want to send to the browser only a image, without HTML code, what
> must I send after this string?
>
> Thanks to all!
>
> Caribe 1999
Again: Thank you!
------------------------------
Date: 24 Jul 2001 17:52:27 +0100
From: nobull@mail.com
Subject: Re: Running the same scripts of different platforms
Message-Id: <u966cinub8.fsf@wcl-l.bham.ac.uk>
Derek Fountain <nomail@hursley.ibm.com> writes:
> What is the best way to make a platform independent she-bang line?
The way given in perlrun ain't bad.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 24 Jul 2001 15:45:57 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: scope for recursive sub
Message-Id: <9jk57l$8dt$1@mamenchi.zrz.TU-Berlin.DE>
According to Jason LaPenta <SPAM_lapenta_jm@yahoo.com>:
> Ohhh, Ok.
>
> I think I'm starting to get the picture.. In perl I'm guessing that you
> can't just declare a variable as local and be done with it... but you
> have to use "my" for each assignment. Right??!!??
Ugh. Unpalatable cluster of ! and ? there. And no, you don't
have to use "my" on every assignment. In fact, in many situations
it would be an error to do so.
> Before I was only
> using a "my $data" at the top of the subroutien once... then I was doing
> "$data = bla" and it wasn't working, ie. data was treated as a global.
No. If "my $data" was at the top of the sub block, $data was local
to it.
> Now I put my in front of every assignment and it works. Am I right? or
> am I really confused? Maybe I should think of the "my" as a "this" in
> c++ ( a nice comfortable structured language, unlike the crazy messy
> artistic perl)? I must admit, going for the world of VHDL and c++ to
> Perl seems take quite a different approach in thinking.
It is usually best not to try and map Perl constructs onto similar
constructs in other languages. That's not because Perl constructs
are particularly unique (they aren't), but because they interact in
particular ways.
"my" and "local" make good example. Many languages have lexical
scoping (Perl's "my" variables), others have dynamic scoping
(Perl's "local") and some have both. But in Perl the relationship
among them is governed by the fact that dynamic variables are legacy
and lexicals are the modern (err... postmodern) way of doing things.
This relation is anchored in the history of the language and not some
innate property of dynamic vs. lexical scoping. But it is what counts
when it comes to deciding which to use, or even when Perl decides to use
the lexical over the dynamic when both are available.
Anno
------------------------------
Date: Tue, 24 Jul 2001 19:09:20 +0200
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: scope for recursive sub
Message-Id: <9jkabs$oegbn$1@ID-13368.news.dfncis.de>
"Jason LaPenta" <SPAM_lapenta_jm@yahoo.com> wrote in
news:3B5D8E9C.D2221C2A@yahoo.com...
>
> I think I'm starting to get the picture.. In perl I'm guessing that you
> can't just declare a variable as local and be done with it... but you
> have to use "my" for each assignment. Right??!!??
No. Your example works also if written as follows:
use strict;
my $index;
sub recursion {
my $data;
$data = $index++;
print "$data\n";
if ( $index < 3 ){
recursion();
}
print "$data\n";
}
$index = 0;
recursion();
> Before I was only
> using a "my $data" at the top of the subroutien once... then I was doing
> "$data = bla" and it wasn't working, ie. data was treated as a global.
> Now I put my in front of every assignment and it works. Am I right?
No.
> or am I really confused?
Yes, you are really confused. Please reread the perlsub manpage, especially
the sections "Private Variables via my()" and "Temporary Values via local()"
------------------------------
Date: Tue, 24 Jul 2001 17:25:45 +0200
From: "Stefan Weiss" <weiss@kung.foo.at>
Subject: Re: Sorting an array of strings by 'closeness' to another string
Message-Id: <3b5d92ce@e-post.inode.at>
"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote:
>>>How would I go about this? I've looked at String::Approx and one of
>>>the functions would be ideal, except I can't install the module on my
>>>host (the goddamn service provider won't do it).
>> "The service provider won't" and "I can't" aren't equivalent,
>> especially if you can login to the web server.
> True. perldoc -q "own module" shows how it's done.
This probably might not work with the current version of String::Approx,
because it needs a C-Compiler. If the OP's provider does not give his
customers access to the compiler (which seems reasonable for ftp-only
customers), he will not be able use the module.
From the README in String::Approx:
| Then the bad news:
|
| * You do need a C compiler. If your system does not have a C
| compiler you should either get one or find a friendly soul to
| compile this extension for you.
| I won't be deleting the String::Approx 2.7 because in some
| restrictive environments compiling C is not an option.
So the easiest solution seems to be to grab the older version, copy
it to some directory on the webserver and "use lib" the directory.
This should solve the problem.
HTH,
stefan
------------------------------
Date: Tue, 24 Jul 2001 16:40:00 +0100
From: Jasper McCrea <jasper@guideguide.com>
Subject: Re: Sorting an array of strings by 'closeness' to another string
Message-Id: <3B5D96D0.7CB1438A@guideguide.com>
jbp wrote:
>
> At Tue, 24 Jul 2001 12:10:44 +0100, Jasper McCrea said:
> >Jasper McCrea wrote:
> >>
> >> jbp wrote:
> >> >
> >
> >>
> >> Actually, this method should really bias towards a single typo better
> >> (eg, if one letter was z when it should have been a, the counter sub
> >> would return a big ish diff, bigger than if all the letters were just
> >> one off). This might be done by $ascii_diff *= 100, or something. Not
> >> sure.
> >
> >Thinking about this a bit more, and what you really want, I think, is a
> >method that returns based on bad typo on a QWERTY keyboard.
> >
> >so you'd get
> >
> >%qwerty = { a => { a => 0,
> > b => 5,
> > c => 3,
> > d => 2,
> > e => 2,
> > ....
> > },
> > b => { a => 5,
> > b => 0,
> > c => 2,
> > ....
> > c => ..
> > d => ..
> > };
> >
> >etc. etc. You get the idea. And instead of saying ascii_diff (like I had
> >in my previous reply), you'd say
> >
> >$qwerty_diff = $qwerty{$your_letter}{$word_letter};
> >
> >and total that for each letter of the words.
> >(there's a good exercise in here of writing a sub to work out the
> >$qwerty_diff knowing the keyboard 'coordinates' of each key, but I can't
> >be arsed right now).
>
> I can :)
>
> make_qwerty_map();
> make_distance_map();
>
> sub make_qwerty_map
> {
> $keyboard{a}{'x'} = 0;
> $keyboard{a}{'y'} = 1;
snip.
> $keyboard{z}{'x'} = 0;
> $keyboard{z}{'y'} = 0;
> }
>
> sub make_distance_map
> {
> for ('a'..'z')
> {
> $letter = $_;
>
> for ('a'..'z')
> {
> $target = $_;
>
> my $this_distance_x = $keyboard{$letter}{'x'} -
> $keyboard{$target}{'x'};
> my $this_distance_y = $keyboard{$letter}{'y'} -
> $keyboard{$target}{'y'};
> $distance{$letter}{$target} = sqrt(($this_distance_x *
> $this_distance_x) + ($this_distance_y * $this_distance_y));
>
> printf(" %s to %s is %02.2f\n", $letter, $target,
> $distance{$letter}{$target});
> }
>
> print "\n";
> }
> }
>
Aha, lunchtime came around, and so could I.
I did it slightly differently..
my @keys = ( [ qw(q w e r t y u i o p) ],
[ qw(a s d f g h j k l) ],
[ qw(z x c v b n m) ]);
my %positions;
my %qwerty;
my $y = 0;
foreach my $rowref (@keys) {
my $x = 0;
foreach my $letter (@$rowref) {
$positions{$letter} = [$x, $y];
++$x;
}
++$y;
}
my @letters;
push @letters, @$_ foreach @keys;
foreach my $first (@letters) {
foreach my $second (@letters) {
my $x_diff_sq = (${$positions{$first}}[0] -
${$positions{$second}}[0]) ** 2;
my $y_diff_sq = (${$positions{$first}}[1] -
${$positions{$second}}[1]) ** 2;
$qwerty{$first}{$second} = int sqrt( $x_diff_sq + $y_diff_sq );
}
}
I used an int root squared distance between the keys, as you can see.
But it gives pretty similar results to yours. And if anyone wants to
adapt to different keyboards, it's easy, too.
Jasper
--
split//,'019617511192'.
'17011111610114101114'.
'21011141011840799901'.
'17101174';
foreach(0..
$#_){$_[$_
++]^=$_[$_
--]^=$_[$_
]^=$_[++ $_]if!($_%
2)}$g.=$_ ,chr($g)=~
/(\w)/&&($o.=$1and
$g='')foreach@_;
print"$o\n"
------------------------------
Date: Tue, 24 Jul 2001 12:11:24 -0400
From: Dave VP <me@my_no_spam.org>
Subject: Re: Sorting an array of strings by 'closeness' to another string
Message-Id: <3B5D9E2C.A54884A6@my_no_spam.org>
jbp wrote:
>
> Howdy
>
> I have a string containing, say, 'transeint' (sic). After some
> massaging the string a little, then grepping a dictionary, then some
> more massaging, i get an array of strings like so:
>
<major snippage>
Thanks for providing an *interesting* discussion topic! And thanks to
those who made such interesting replies. Good to see some actual
thinking around here!!!
------------------------------
Date: Tue, 24 Jul 2001 17:30:29 +0100
From: jbp <jpixton@dircon.co.uk>
Subject: Re: Sorting an array of strings by 'closeness' to another string
Message-Id: <gd8rlto9ee0fkfj3f6qn9h50t7i6gef98s@4ax.com>
At Tue, 24 Jul 2001 16:40:00 +0100, Jasper McCrea said:
>jbp wrote:
>>
>> At Tue, 24 Jul 2001 12:10:44 +0100, Jasper McCrea said:
>> >Jasper McCrea wrote:
>> >>
>> >> jbp wrote:
>> >> >
>> >
>> >>
>> >> Actually, this method should really bias towards a single typo better
>> >> (eg, if one letter was z when it should have been a, the counter sub
>> >> would return a big ish diff, bigger than if all the letters were just
>> >> one off). This might be done by $ascii_diff *= 100, or something. Not
>> >> sure.
>> >
>> >Thinking about this a bit more, and what you really want, I think, is a
>> >method that returns based on bad typo on a QWERTY keyboard.
>> >
>> >so you'd get
>> >
>> >%qwerty = { a => { a => 0,
>> > b => 5,
>> > c => 3,
>> > d => 2,
>> > e => 2,
>> > ....
>> > },
>> > b => { a => 5,
>> > b => 0,
>> > c => 2,
>> > ....
>> > c => ..
>> > d => ..
>> > };
>> >
>> >etc. etc. You get the idea. And instead of saying ascii_diff (like I had
>> >in my previous reply), you'd say
>> >
>> >$qwerty_diff = $qwerty{$your_letter}{$word_letter};
>> >
>> >and total that for each letter of the words.
>> >(there's a good exercise in here of writing a sub to work out the
>> >$qwerty_diff knowing the keyboard 'coordinates' of each key, but I can't
>> >be arsed right now).
>>
>> I can :)
>>
>> make_qwerty_map();
--- 8< ---
>> }
>>
>
>Aha, lunchtime came around, and so could I.
>
>I did it slightly differently..
>
>my @keys = ( [ qw(q w e r t y u i o p) ],
> [ qw(a s d f g h j k l) ],
> [ qw(z x c v b n m) ]);
>
>my %positions;
>my %qwerty;
>
>my $y = 0;
>foreach my $rowref (@keys) {
> my $x = 0;
> foreach my $letter (@$rowref) {
> $positions{$letter} = [$x, $y];
> ++$x;
> }
> ++$y;
>}
>
>my @letters;
>push @letters, @$_ foreach @keys;
>
>foreach my $first (@letters) {
> foreach my $second (@letters) {
> my $x_diff_sq = (${$positions{$first}}[0] -
>${$positions{$second}}[0]) ** 2;
> my $y_diff_sq = (${$positions{$first}}[1] -
>${$positions{$second}}[1]) ** 2;
>
> $qwerty{$first}{$second} = int sqrt( $x_diff_sq + $y_diff_sq );
> }
>}
>
>I used an int root squared distance between the keys, as you can see.
>But it gives pretty similar results to yours. And if anyone wants to
>adapt to different keyboards, it's easy, too.
Yep, thats definetely a lot nicer solution. Plus you don't get ink on
your keyboard working out the coordinates! ;)
Thanks again for your help :)
--
Joseph Birr-Pixton .:|:. http://ifihada.com .:|:. ICQ#40675236
------------------------------
Date: Tue, 24 Jul 2001 17:20:39 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Splitting Peculiar HTML
Message-Id: <3B5D9247.7000208@post.rwth-aachen.de>
Godzilla! wrote:
>(snippage not noted by Atkins aka Parseval aka The CLPM Troll)
>
Oh, now you disappoint me. I expected something more witty than that.
>Are you the originating author's loving mouth piece?
>
No. It may not occur to you: You are not just pissing off those people
you reply to but also those who read your pointless replies.
Such as I did throught the last couple of days. Looks as though you had
been killfiled more than once already. And so I wonder who the CLPM
Troll really is.
Tassilo
--
When you live in a sick society, just about everything you do is wrong.
------------------------------
Date: Tue, 24 Jul 2001 15:43:27 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Splitting Peculiar HTML
Message-Id: <k65rltsbnp9qoockga8voj34d1sqm3s7je@4ax.com>
Bill Atkins wrote:
>Given the following HTML code:
>
>gtgtgtgtgtgtgtgtgtaaaag<font
>color="blue">acacggc</font>aattaatatcgtggcgagaccttctctctttcttttaccgctcccggggtcctcctcaattcatccgctcctcgagacgaagacgtcgacacaatcggtgtttatttttgcgacgtagggcaattttactcgcaaacatatgagaggggaggcgccgacgacacccgggcgggcggcctgacgagaggtttagatagcgggggaaatagagaagttggaatgaagcggctgctattgctgccaccgcacggcaagaagcggacacaattcaacccgaagatattttttatgtgcacctagatgaactctttttgcaaaacctctcaattagtagacctttgaaactcaacaacgtttggacgaacctaacttg
>caccgccgcctttttctctaatcttatctgatgaaacagaacatctgatgttatcacaatcaatcaaatcttattcatctctacgaattcgtaaatgttttcacttacatataaattggaagaaaaacggattatcgttccagagatcaaaaaatgatgtgcctccccttttttgcaattaatcctcaactcgtatttctctttgtatgtcttgaaaattgaaatttagacagtttagttgttatcacgtcagttttgtgtattccacttgaactatctatctggttggttagtctcctcccacccatgagtctt<b>tcatttatgtttg</b>tctagcctgacaattgacctgaccaccaaccatcaggtctctcccacgttttgtatttttattat
>cacattacgaactgtgtgaaaatggctg
>
>is there any way to divide the text into groups of ten without
>including the HTML tags? For instance, the result would be:
>
><font color="blue">agggg</font>cgagc cgagcgcagt tgcacgtacc ttgccaaaag
With HTML::TokeParser (comes with HTML::Parser), it's easy to
differentiate between tags and text. Unfortunately, there's a problem
with comments, there's no easy way to keep the original comments as they
were, so removing them is the simplest to do. Try:
use HTML::TokeParser;
my $p = new HTML::TokeParser('test.htm');
my $length = 0;
while(my $t = $p->get_token) {
if($t->[0] =~ /[SE]/) {
print $t->[-1];
} elsif($t->[0] eq 'T') {
local $_ = $t->[-1];
tr/\n//d;
while(length()+$length >= 10) {
print substr($_, 0, 10-$length, "");
print "\n";
$length = 0;
}
print;
$length = length;
}
}
--
Bart.
------------------------------
Date: 24 Jul 2001 10:14:21 -0700
From: billatkins@bigfoot.com (Bill Atkins)
Subject: Re: Splitting Peculiar HTML
Message-Id: <60805a5e.0107240914.27e180a1@posting.google.com>
Four other people understodd it, didn't they?
Bill
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message news:<3B5CDDA1.9CF2290B@stomp.stomp.tokyo>...
> Bill Atkins wrote:
>
> > Given the following HTML code:
>
> (snipped)
>
> > is there any way to divide the text into groups of ten without
> > including the HTML tags? For instance, the result would be:
>
> > <font color="blue">agggg</font>cgagc cgagcgcagt tgcacgtacc ttgccaaaag
>
> > Any help would be appreciated.
>
>
> Here is some help. You have contradicted yourself
> within the same breath. You say you want html tags
> removed, then cite an example displaying html
> tags. Consider resolving your confusion, then
> write and post a coherent article.
>
>
> Godzilla!
------------------------------
Date: 24 Jul 2001 10:14:50 -0700
From: billatkins@bigfoot.com (Bill Atkins)
Subject: Re: Splitting Peculiar HTML
Message-Id: <60805a5e.0107240914.7bd4055@posting.google.com>
Four other people understood it, didn't they?
Bill
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message news:<3B5CDDA1.9CF2290B@stomp.stomp.tokyo>...
> Bill Atkins wrote:
>
> > Given the following HTML code:
>
> (snipped)
>
> > is there any way to divide the text into groups of ten without
> > including the HTML tags? For instance, the result would be:
>
> > <font color="blue">agggg</font>cgagc cgagcgcagt tgcacgtacc ttgccaaaag
>
> > Any help would be appreciated.
>
>
> Here is some help. You have contradicted yourself
> within the same breath. You say you want html tags
> removed, then cite an example displaying html
> tags. Consider resolving your confusion, then
> write and post a coherent article.
>
>
> Godzilla!
------------------------------
Date: 24 Jul 2001 10:41:55 -0700
From: Gerard Lanois <gerard@NOSPAMlanois.com>
Subject: Re: Upgrade Perl on RH7.1 From Source
Message-Id: <ubsma5in0.fsf@NOSPAMlanois.com>
kevin@parr.net (Kevin der Kinderen) writes:
> Nope. That didn't do it. It actually caused a host of other problems
> with dependencies in RH. For instance, I couldn't restart httpd
> (apache). It was still looking for 5.6.0 modules.
>
> So, my conclusion... If I want to play I need a linux system that's
> not based on RPMs and such.
Here is a (free) product that tries to help you get a consistent
installation up and running:
http://www.apachetoolbox.com/
-Gerard
http://www.geocities.com/gerardlanois/perl/
------------------------------
Date: Tue, 24 Jul 2001 16:41:14 +0100
From: James Coupe <james@zephyr.org.uk>
Subject: Re: What am I doing wrong? Help.
Message-Id: <FH5BsRPacZX7Ew9Z@gratiano.zephyr.org.uk>
In message <9jj0gc$mr3$1@nntp9.atl.mindspring.net>, Jason Hunter
<me@nospam.net> writes
>Thanks for the tip. I thought MSA was a reliable place, but I guess that
>just shows how new I am...;-)
Unfortunately, so do a lot of people. :(
>The quote in the last section was simply a typo in my post, but not in the
>code.
Bad move.
If you post non-functioning code to the group, you *have* to post the
real code. No-one can do anything if they're having to fight with "Is
this a typo?"
--
James Coupe PGP Key: 0x5D623D5D
"Surely somewhere out there there's a woman who's EBD690ECD7A1F
been sodomized by her father and is capable of B457CA213D7E6
composing a few coherent sentences on the subject." 68C3695D623D5D
------------------------------
Date: Sun, 22 Jul 2001 14:43:27 GMT
From: jay <seandarcy@hotmail.com>
Subject: Re: where is the "standard library"
Message-Id: <3B5AE7E9.1060204@hotmail.com>
Thanks for the reply. As you suggested. Now if "@INC" has the standard
libraries, then I still don't understand my problem, because the second
library contains getopts.pl. I realize that the seventh and last library
is the current directory. But certainly the point of standard libraries
is to avoid cd'ing around.
So...If these are the standard libraries, and getopts.pl is in the
second, why doesn't perl getopts.pl find it???
[system@localhost system]$ perl -e 'print join("\n",@INC);'
/usr/lib/perl5/5.6.1/i386-redhat-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/i386-redhat-linux/5.6.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.
jay
Akira Yamanita wrote:
> jay wrote:
>
>>I'm running perl 5.6.1 on rh7.1. In trying to install a ghostscript rpm,
>>I got the error message that it couldn't find getopts.pl.
>>
>>But:
>>[root@localhost root]# locate getopts.pl
>>/usr/lib/perl5/5.6.1/getopts.pl
>>
>>So I figured there's something wrong with the rpm, but....
>>
>>[root@localhost root]# perl getopts.pl
>>Can't open perl script "getopts.pl": No such file or directory
>>
>
> Of course not. getopts.pl is not in /root which is where you were
> trying to access it. You didn't specify a path nor did you change
> directories to /usr/lib/perl5/5.6.1
>
>
>>I don't have PERLLIB or PERL5LIB defined. As I read the docs, without
>>these defined, perl supposed to look in the "standard library". If
>>/usr/lib/perl5/5.6.1 isn't the standard library, what is? where is it set?
>>
>
> perl -e 'print join("\n",@INC);'
>
------------------------------
Date: 24 Jul 2001 16:11:37 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: where is the "standard library"
Message-Id: <9jk6np$8dt$2@mamenchi.zrz.TU-Berlin.DE>
According to jay <seandarcy@hotmail.com>:
Please don't top-post. It makes a dialog impossible.
> Thanks for the reply. As you suggested. Now if "@INC" has the standard
> libraries, then I still don't understand my problem, because the second
> library contains getopts.pl. I realize that the seventh and last library
> is the current directory. But certainly the point of standard libraries
> is to avoid cd'ing around.
>
> So...If these are the standard libraries, and getopts.pl is in the
> second, why doesn't perl getopts.pl find it???
As has been explained more than once in this thread, @INC is there
to help Perl find modules to "use" (and libraries to "require" or
"do"). Your call "perl getopts.pl" asks Perl to run the script
getopts.pl, which is something else again, and @INC is not used
for that purpose. The script (getopts.pl) must be in the current
directory or must be given including a path name (absolute or
relative).
If you want to test (from the commandline) if the library getopt.pl
can be found, use
perl -e 'require "getopt.pl"'
Anno
------------------------------
Date: Tue, 24 Jul 2001 19:28:52 +0200
From: "Lance" <lance@chatwell.net>
Subject: Windows
Message-Id: <9jkbf7$4c1$06$1@news.t-online.com>
Hi,
I have been looking for a way to create partitions and change drive letters
underwindows without using the windisk, or by using the command line. Does
anyone know of a way in which I could use Perl to help me accomplish this?
Thanks
Lance Chatwell
------------------------------
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 1370
***************************************