[28455] in Perl-Users-Digest
Perl-Users Digest, Issue: 9819 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 7 21:05:56 2006
Date: Sat, 7 Oct 2006 18:05:04 -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 Sat, 7 Oct 2006 Volume: 10 Number: 9819
Today's topics:
Re: backreference oddity <see.sig@rochester.rr.com>
Re: Command substitution in perl <tintin@invalid.invalid>
Re: Command substitution in perl <christoph.lamprecht.no.spam@web.de>
Re: Complex regular expression <ced@blv-sam-01.ca.boeing.com>
Re: Dealing with a STRANGE API <benmorrow@tiscali.co.uk>
Distributed multitasking, POE, communication schwarzenschafe@gmail.com
Get Pedia <cutemonication2@yahoo.com>
Re: Posting Guidelines for comp.lang.perl.misc ($Revisi <nospam-abuse@ilyaz.org>
Re: Regex help for URL <tadmc@augustmail.com>
Re: Regex help for URL <benmorrow@tiscali.co.uk>
Re: Unique in-depth problem <idgarad@gmail.com>
Re: Unique in-depth problem <hjp-usenet2@hjp.at>
Re: unpack with offset (skip, X) won't work (reading news)
Re: unpack with offset (skip, X) won't work <dmercer@mn.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 07 Oct 2006 19:50:55 GMT
From: Bob Walton <see.sig@rochester.rr.com>
Subject: Re: backreference oddity
Message-Id: <zyTVg.5967$0L1.3246@twister.nyroc.rr.com>
Ala Qumsieh wrote:
> Bob Walton wrote:
>
>> Doesn't work because of the syntax error. And because the contents of
>> the {...} construction have to be literal digits or digits,digits .
>
> Not true. They can be variables. See my other post in this thread.
>
> --Ala
>
Hmmm...yes, I see that this works -- thank you:
use strict;
use warnings;
while(<DATA>){
chomp;
/^(.+)\s(.+)\sXX\s(\d+)\s((??{".{$3}"}))/;
print "line:$_:\n\$4:$4:\n";
}
__END__
bar1 bar2 XX 10 bar3tootenblahblahblah
foo1 foo2 XX 15 foo3uptofifteenyadayadayada
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: Sun, 8 Oct 2006 10:02:50 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: Command substitution in perl
Message-Id: <45280848$0$19644$88260bb3@free.teranews.com>
"kp" <kiran.r.pillai@gmail.com> wrote in message
news:1160235700.826206.131650@h48g2000cwc.googlegroups.com...
> My perl module file includes this line:
> $HOSTNAME = "/usr/bin/hostname";
>
> I have sourced this perl module file in my perl script.
>
> In my perl script I have an if loop :
> if ( `$HOSTNAME` eq "rsd2" ) {
> print "NFS server is fsd2";
> }
>
>
> However, this command substitution does not seem to work.
>
> Any clues???
$HOSTNAME does not contain the value you think it does.
Do
print "X $HOSTNAME X\n";
And you'll see
perldoc -f chomp
--
Posted via a free Usenet account from http://www.teranews.com
------------------------------
Date: Sat, 07 Oct 2006 23:54:16 +0200
From: Ch Lamprecht <christoph.lamprecht.no.spam@web.de>
Subject: Re: Command substitution in perl
Message-Id: <eg97m8$7kn$2@online.de>
kp wrote:
> My perl module file includes this line:
> $HOSTNAME = "/usr/bin/hostname";
>
> I have sourced this perl module file in my perl script.
How did you do that?
>
> In my perl script I have an if loop :
> if ( `$HOSTNAME` eq "rsd2" ) {
`$ModulesPackage::HOSTNAME`
> print "NFS server is fsd2";
> }
>
>
> However, this command substitution does not seem to work.
>
> Any clues???
>
> -kp
>
Should work like that:
Chris@CHRIS ~
$ perl -e'$hn = "hostname" ;print`$hn`'
CHRIS
The $HOSTNAME you want to use might be in another package??
Christoph
--
perl -e "print scalar reverse q/ed.enilno@ergn.l.hc/"
------------------------------
Date: Sat, 7 Oct 2006 22:50:05 GMT
From: Charles DeRykus <ced@blv-sam-01.ca.boeing.com>
Subject: Re: Complex regular expression
Message-Id: <J6sFFE.84J@news.boeing.com>
jayanthigk2004@yahoo.com wrote:
> Is it possible to write a regular expression for this ?
>
> Pattern: 999-99-999
>
>
> Where 9 is any number from 0 to 9
>
>
> However the user need not enter ALL the digits and dashes as given in
> the format.
>
>
> Whatever numbers and dashes he had entered must match the above format,
>
> from left to right, for only the charcters he has entered.
>
>
> For example
> 9
> 99
> 999
> 999-
> 999-9
> 999-99
> 999-99-
> 999-99-9
> 999-99-99
> 999-99-999
>
>
> Any of the above should result in a match
>
>
> Next, he can also put * before or after or before and after any of the
> above combination
>
>
> Ex
>
>
> *9
> *99
> *999
> *999-
> *999-9
> *999-99
> *999-99-
> *999-99-9
> *999-99-99
> *999-99-999
>
>
> Or
>
>
> 9*
> 99*
> 999*
> 999-*
> 999-9*
> 999-99*
> 999-99-*
> 999-99-9*
> 999-99-99*
> 999-99-999*
>
>
> Or
>
>
> *9*
> *99*
> *999*
> *999-*
> *999-9*
> *999-99*
> *999-99-*
> *999-99-9*
> *999-99-99*
> *999-99-999*
>
>
> Any help is much appreciated.
>
>
> Reply »
>
>
> From: jayanthigk2...@yahoo.com - view profile
> Date: Thurs, Oct 5 2006 6:52 pm
> Email: jayanthigk2...@yahoo.com
> Groups: microsoft.public.dotnet.languages.csharp
> Not yet ratedRating:
> show options
> Reply | Reply to Author | Forward | Print | Individual Message | Show
> original | Remove | Report Abuse | Find messages by this author
>
>
> Is it possible to write a regular expression for this ?
>
> Pattern: 999-99-999
>
>
> Where 9 is any number from 0 to 9
>
>
> However the user need not enter ALL the digits and dashes as given in
> the format.
>
>
> Whatever numbers and dashes he had entered must match the above format,
>
> from left to right, for only the charcters he has entered.
>
>
> For example
> 9
> 99
> 999
> 999-
> 999-9
> 999-99
> 999-99-
> 999-99-9
> 999-99-99
> 999-99-999
>
>
> Any of the above should result in a match
>
>
> Next, he can also put * before or after or before and after any of the
> above combination
>
>
maybe I'm missing something but seems like `index' should do it once
you've eliminated the irrelevant leading/trailing *'s:
my $pat = '999-99-999';
my ( $no_star = $some_str ) =~ s/\A\*//; $no_star =~ s/\*\z//;
print "match: $some_str" if index( $pat, $no_star ) == 0;
--
Charles DeRykus
------------------------------
Date: Sat, 7 Oct 2006 07:29:16 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Dealing with a STRANGE API
Message-Id: <s2ujv3-9os.ln1@osiris.mauzo.dyndns.org>
Quoth Ignoramus7272 <ignoramus7272@NOSPAM.7272.invalid>:
> On 6 Oct 2006 23:12:19 GMT, anno4000@radom.zrz.tu-berlin.de
> <anno4000@radom.zrz.tu-berlin.de> wrote:
> > Ignoramus7272 <ignoramus7272@NOSPAM.7272.invalid> wrote in comp.lang.perl.misc:
> >> I am using PayPal API class
> >>
> >> Business::PayPal::API::TransactionSearch
> >
> > Untested:
[snipped]
>
> OK, thanks. I used your code to write this:
>
> sub run_weird_method {
> my ($sub, @args) = @_;
> my @mystery = &$sub( @args );
I don't know if you realise, but this will not call $sub as a method.
(Even if you pass in an object as the first argument manually, you will
not get any inheritance). You would have to call this function as
my %results = run_weird_method
sub { $PayPal->TransactionSearch(@_) },
qw/foo bar baz/;
which is a little odd, to say the least. For my part, if I really wanted
a general-purpose sub like this (AFAICT, this is the only sub in
Business::PayPal that behaves like this, so I'd probably just wrap
that), I would either prototype it to accept a coderef and call that:
sub call_weird (&) {
my ($sub) = @_;
my @mystery = $sub->();
...
}
my $results = call_weird {
$PayPay->TransactionSearch(qw/foo bar baz/);
};
or simply accept and translate a list:
sub remove_weirdness {
my @mystery = @_;
...
}
my $results = remove_weirdness
$PayPal->TransactionSearch(qw/foo bar baz/);
If you really want to pass a method and an arglist you would need to
accept an object argument as well:
sub run_weird_method {
my ($obj, $meth, @args) = @_;
my @mystery = $obj->$meth(@args);
...
}
my $results = run_weird_method
$PayPal, TransactionSearch => qw/foo bar baz/;
A quick scan of the docs for B::PP::A::TS suggests that this behaviour is
a bug. Indeed, both the initial example and the "ERROR HANDLING" section
state that a succesful return *also* returns a hash, with a true 'Ack'
member and the result somewhere else (unspecified) in the hash. The 0.11
version says the module is still in alpha: Be Very Careful. Alpha
modules playing with your money is not something I would like. Depending
on how much work you want to do, you may be better off calling the
PayPal API yourself with SOAP::Lite.
> if ( @mystery == 1 ) {
> # normal processing
> return { success => 1, result => $mystery[0] };
> }
>
> # Failure
> my %hash = @mystery;
> return { success => 0, result => \%hash };
Here I would instead emulate the rest of the B::PP::A interface, that is
if (@mystery == 1) {
# success
return ( Ack => 'Success', Results => $mystery[0] );
}
else {
# failure
# the hash should already have an Ack => 'Failure' member
return @mystery;
# if for some reason it doesn't:
# return ( Ack => 'Failure', @mystery );
}
Not that I like that interface one bit, but consistency is always a good
thing :).
I would also consider overwriting &B::PP::A::TS::TransactionSearch with
a sub that behaves correctly (perhaps with Hook::LexWrap); and
submitting a patch to the author.
Ben
--
If I were a butterfly I'd live for a day, / I would be free, just blowing away.
This cruel country has driven me down / Teased me and lied, teased me and lied.
I've only sad stories to tell to this town: / My dreams have withered and died.
benmorrow@tiscali.co.uk (Kate Rusby)
------------------------------
Date: 7 Oct 2006 15:24:52 -0700
From: schwarzenschafe@gmail.com
Subject: Distributed multitasking, POE, communication
Message-Id: <1160259892.304375.276890@c28g2000cwb.googlegroups.com>
I'm writing a distributed WWW media (images) robot. I want a central
server that holds the database and manages the other servers. These
other servers will manage several robot processes. Every server will
have different access to the web, and must communicate over the
internet.
I'd like to use POE, I need some kind of event driven management of
each server. I can't run the robots themselves in POE because they'll
be waiting for LWP to return webpages, and I'd also like to sleep()
which makes the whole POE driven server (all robots) stop.
The best setup I can come up with uses domain sockets for the robot
proccesses to communicate with the POE management process, which itself
can communicate with the POE central server. I'm not very clear on how
the servers will communicate. I want a permenant bidirectional
connection, but I don't know if I can make a single TCP/IP connection
with POE and have either server send data to the other to trigger
events on the remote server. Likewise if the robot process and POE can
monitor local sockets for bidirectional communication on teh same
machine. Any help is appreciated, including which modules I should look
at. I've found a lot of books on robots, read some. And yes, I know
what a monumental undertaking this is (I either have a lot of time or
I'm a senseless dreamer, or both). Regards,
- SS
------------------------------
Date: Sun, 8 Oct 2006 09:40:17 +0900
From: Get Pedia<cutemonication2@yahoo.com>
Subject: Get Pedia
Message-Id: <eg9hdg$673$1073@main.corriga.net>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE></TITLE>
</HEAD>
<BODY>
<P>i am sorry if this is the wrong section . i just
finished a huge website called <A
href="http://www.this.explains.it">www.this.explains.it</A>
<A
href="http://www.getpedia.com"></A> and i need your reviews
:</P>
<P>*More than 150,000 articles in the search database .. </P>
<P>*Learn how almost everything works in the easiest way possible...</P>
<P>*randomly generated articles for more fun at <A href="http://www.this.explains.it" >GetPedia</A></P>
</BODY>
</HTML>
------------------------------
Date: Sat, 7 Oct 2006 21:39:10 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.6 $)
Message-Id: <eg96pu$1lg8$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Tad McClellan
<tadmc@augustmail.com>], who wrote in article <slrneif7pt.89h.tadmc@magna.augustmail.com>:
> > This section assumes that faux pas are performed most often by
> > newbies;
> I'm not seeing that, and I don't see its relevance even if true.
> Asking a FAQ is bad manners whether you know that posting a FAQ
> is bad manners or not.
It looks like you think in terms "this is right" or "this is wrong".
I prefer to think in terms "what you want to achieve". Rudeness is in
the eyes of the beholder.
Asking a FAQ is a fact of life. It may be "bad manners"; but
currently "your" posting guidelines are *used as foundation* to
proliferate this fact of life into a cascade of much worse manners.
> > and most of this increase is, IMO, due
> > to (some) KNOWLEDGEABLE REGULARS being INTENTIONALLY rude.
> IMO, most of this increase is due to the makeup of folks that
> post to the newsgroup (ie. Virtual September[1]).
Maybe this was true about 3 years ago. Nowadays, I do not perceive
much more cluelessness than in the end of '90.
And I refuse to put blame on clueless people when their posts trigger
fountains of rudeness. It is not a "proportional response"; it is not
achieving anything that I want to stay.
Thanks,
Ilya
------------------------------
Date: Sat, 7 Oct 2006 13:42:00 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Regex help for URL
Message-Id: <slrneift7o.cqr.tadmc@magna.augustmail.com>
Seb <solive@gmail.com> wrote:
> Thanks. I do need to use a regular expression since it is the only
> mechanism I can use in the search engine I am using to enter a valid
> exclusion.
Ask a question in the Perl newsgroup, get an answer in the Perl language.
[ snip TOFU ]
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 7 Oct 2006 07:37:17 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Regex help for URL
Message-Id: <thujv3-9os.ln1@osiris.mauzo.dyndns.org>
Quoth "Seb" <solive@gmail.com>:
>
> I am trying to find the right regular expression which would only
> validate a URL with a given number of folders.
>
> Example:
>
> http://www.abc.com/folder/page.htm --> Valid (4 slahes)
>
> http://www.abc.com/folder/subfolder/ --> not valid (5 slashes)
>
> Basically, any URL not made of 4 slahes would be invalid.
> However, the URL:
>
> http://www.abc.com/folder/subfolder --> would also be invalid
Please explain how anyone is supposed to tell from looking at that URL
that the last /subfolder is a directory ('folder') and not a file.
Please explain how anyone is supposed to tell by any means whatever,
given that http (setting aside WebDAV) has no concept of 'directory';
other that by guessing that if retrieving it gives a redirect to
http://.../subfolder/ then the URL refers to some directory in some
filesystem somewhere.
A regex to match a string with exactly four slashes in it is
m{ ^ (?: [^/]* / ){4} [^/]* $ }x
, but I do not think that will help you here.
Ben
--
Although few may originate a policy, we are all able to judge it.
Pericles of Athens, c.430 B.C.
benmorrow@tiscali.co.uk
------------------------------
Date: 7 Oct 2006 12:28:33 -0700
From: "Idgarad" <idgarad@gmail.com>
Subject: Re: Unique in-depth problem
Message-Id: <1160249313.194621.59450@m73g2000cwd.googlegroups.com>
The back end is SQL, for the sake of sanity I broke up the dates into
separate fields for day, month, and year. Even SQL dies a horrible
grizzley death when querying say the duration of the roman empire per
the database entries. It is sheer horror so far. I checked PNG and
sadly PNG is not viable as any bitmap format results in terabyte sized
files. Vector is going to be my only option. They want to be able to
print out wall sized images so I not only have to be able to efficently
chop the image up but be able to handle absurd format sizes (they are
planning on using a HP Designjet 42 wide printer with as much as 300
feet (yes feet) on a roll and print it out. Sending a bitmap is
possible if I segment it but the printer only has a 30gb hard drive per
batch. Ugg... As far as the perl side of this goes it doesn't seem that
there is any modules that exist to handle something of this nature so
they're going to need to bring in someone to write an epoc-less date
module, that is outside of my capabilities. I appreciate the feedback
from everyone. Thank You All!
Ted Zlatanov wrote:
> On 6 Oct 2006, idgarad@gmail.com wrote:
>
> > I need to work with, manage, and render a timeline. The problem? The
> > dates range, in years, from 0 to 1452652!! So I have a few hurdles:
> >
> > 1: Standard date libraries don't work. These dates are vastly out of
> > epoch ranges.
>
> > 2: I have to render events on a timeline. Requirements are open but it
> > has to be able to handle rendering the whole damn thing at once (i.e
> > zooming in is ok.) but effectivly I have to either use SVG or Flash to
> > do this. Resolution goes to the day so:
> > YEAR|YEAR| etc..
> > MONTH|MONTH|MONTH|MONTH| etc..
> > 1|2|3|4|etc...
> > -----------
> > XXXXXXXXXXXXXX YYYYYYYYYY ZZZZZZZZZZZZZZZZZZZZ
> >
> > I originally did this via tables with colspans etc. but complicated
> > entries with 800+ events in a month (I was only rendering a single
> > year) could take up to 3 hours to display on a browser. SVG or Flash is
> > gonna be needed.
> >
> > Dear God! What to do!? So the questions are really this:
> >
> > Q1: What options do I have in Perl for handling dates of this nature
>
> You can easily write a class to handle these dates.
>
> Precompute all the dates and put them in a database (file, SQL server,
> etc.).
>
> Look at Google Maps for inspiration. They deal with lots of pieces of
> a huge data set, yet manage to retrieve and show only the interesting
> ones quickly.
>
> > Q2: What graphical format is going to be able to handle, assuming I
> > dedicated 10px per day (so each year would be at leasy 3650px wide),
> > handling something of that scale? (Lets assume a limited viewport is
> > acceptable so we don't have to display the whole thing at once...)
>
> PNG should work.
>
> > Think of this as a History of the World Gnatt chart of sorts. I mean
> > what options, if any, are there for this kind of problem? I can batch
> > the process (It does not have to be real-time thank god!) but must be
> > doable within an 16 hour window utilizing a standard desktop (p4, 2ghz
> > lets say). This would eventually end up on a server but the constraint
> > is can start a friday night and must be done before Sunday 11:30pm so I
> > am working with Worst Case Scenario here.
>
> s/Gnatt/Gantt/
>
> Just generate the dates that have changed since the last build.
>
> When dealing with large data sets, three things are always important:
>
> 1) cache data everywhere possible
>
> 2) precompute things when possible
>
> 3) buy as much RAM as possible for the server
>
> With Perl, these are just as valid as with Java or any other language.
>
> Also consider using something on the storage backend like a SQL server
> (MySQL, Postgres, etc.) that can do efficient queries across your data.
>
> Ted
------------------------------
Date: Sat, 7 Oct 2006 23:18:03 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Unique in-depth problem
Message-Id: <slrneig6cb.nu4.hjp-usenet2@yoyo.hjp.at>
[quoting corrected for better readability - please don't top-post]
On 2006-10-07 19:28, Idgarad <idgarad@gmail.com> wrote:
> Ted Zlatanov wrote:
>> On 6 Oct 2006, idgarad@gmail.com wrote:
>> > I need to work with, manage, and render a timeline. The problem? The
>> > dates range, in years, from 0 to 1452652!! So I have a few hurdles:
>> >
>> > 1: Standard date libraries don't work. These dates are vastly out of
>> > epoch ranges.
>>
>> > 2: I have to render events on a timeline. Requirements are open but it
>> > has to be able to handle rendering the whole damn thing at once (i.e
>> > zooming in is ok.) but effectivly I have to either use SVG or Flash to
>> > do this. Resolution goes to the day so:
[...]
>> > I originally did this via tables with colspans etc. but complicated
>> > entries with 800+ events in a month (I was only rendering a single
>> > year) could take up to 3 hours to display on a browser. SVG or Flash is
>> > gonna be needed.
>> >
>> > Dear God! What to do!? So the questions are really this:
>> >
>> > Q1: What options do I have in Perl for handling dates of this nature
>>
>> You can easily write a class to handle these dates.
>>
>> Precompute all the dates and put them in a database (file, SQL server,
>> etc.).
>>
>> Look at Google Maps for inspiration. They deal with lots of pieces of
>> a huge data set, yet manage to retrieve and show only the interesting
>> ones quickly.
>>
>> > Q2: What graphical format is going to be able to handle, assuming I
>> > dedicated 10px per day (so each year would be at leasy 3650px wide),
>> > handling something of that scale? (Lets assume a limited viewport is
>> > acceptable so we don't have to display the whole thing at once...)
>>
>> PNG should work.
>
> I checked PNG and sadly PNG is not viable as any bitmap format results
> in terabyte sized files. Vector is going to be my only option. They
> want to be able to print out wall sized images so I not only have to
> be able to efficently chop the image up but be able to handle absurd
> format sizes (they are planning on using a HP Designjet 42 wide
> printer with as much as 300 feet (yes feet) on a roll and print it
> out.
How do you plan to use SVG or Flash on a printer? When you were talking
about colspan, SVG or Flash, everybody was probably assuming you were
talking about showing the timeline on a browser, not on hundreds of
square meters of paper.
Since a browser can't show more than a few thousand pixels in either
direction, you would generate only the small tile currently viewed - no
need to generate terabyte-sized png files.
For the printer, you should probably generate narrow strips and print
one after the other. Since I assume that the 1.5 million years will span
the 300 feet and not the 42 inches, you can proably just print one year
after the other.
>> > Think of this as a History of the World Gnatt chart of sorts. I mean
>> > what options, if any, are there for this kind of problem? I can batch
>> > the process (It does not have to be real-time thank god!) but must be
>> > doable within an 16 hour window utilizing a standard desktop (p4, 2ghz
>> > lets say). This would eventually end up on a server but the constraint
>> > is can start a friday night and must be done before Sunday 11:30pm so I
>> > am working with Worst Case Scenario here.
Oh, BTW, your 1.5 million years are about 530 million days. If you allot
1 mm per day (which corresponds roughly to your 10 px/day at 300 dpi),
your chart will be 530 km long. If you want to print that in 16 hours,
your printer must print at least 33 km/h. I doubt a HP designjet can do
this, never mention that you need to load one of your 300 feet paper
rolls every 11 seconds.
> batch. Ugg... As far as the perl side of this goes it doesn't seem that
> there is any modules that exist to handle something of this nature so
> they're going to need to bring in someone to write an epoc-less date
> module, that is outside of my capabilities.
The date part seems actually pretty easy, unless you have to deal with
real calendars (like the missing days at the transition between the
Julian and Gregorian Calendar or the irregular leap days in the early
Julian era - not to mention calendars like Islamic calendar which cannot
be reliably computed because they depend on astronomical observations).
Perl uses double precision floating point numbers, so at 1.5 millions
years you can still represent fractions of seconds, and the mathematics
of the Gregorian calendar (for instance) aren't that complicated (except
for Easter).
Laying out a graph that large seems to be much more problematic to me.
hp
--
_ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR | > ist?
| | | hjp@hjp.at | Was sonst wäre der Sinn des Erfindens?
__/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
------------------------------
Date: Sat, 07 Oct 2006 18:29:31 GMT
From: "Mumia W. (reading news)" <paduille.4059.mumia.w@earthlink.net>
Subject: Re: unpack with offset (skip, X) won't work
Message-Id: <fmSVg.11252$UG4.585@newsread2.news.pas.earthlink.net>
On 10/07/2006 12:38 PM, Mirco Wahab wrote:
> Thus spoke Mumia W. (reading news) (on 2006-10-07 19:24):
>> On 10/07/2006 11:51 AM, Mirco Wahab wrote:
>>> my ($i, $j, $k, $l) = unpack 'FX3F4', $binstr;
>> my ($i, $j, $k, $l) = unpack 'x[F3]F4', $binstr;
>
> Thanks for your fast and correct response. Actually,
> I read the perlpacktut and had already figured:
>
> my ($i, $j, $k, $l) = unpack 'X[F3]F4', $binstr; # wrong try
>
> (with a large 'X') and it, of course, didn't work and
> so I dropped this strategy and throwed the gun away ...
>
>> The string "x[F3]" allows you to skip the number of
>> bytes that would make up three native floats.
>
> Nice, now after I know that from you, I can
> find the place where it is said in perlpacktut ... :-)
>
> Regards & Thanks
>
> Mirco
You're welcome, and thanks for pointing me to perlpacktut. I can't
believe that Perl can uuencode without using a module!
:-O
--
Mumia W.
paduille.4059.mumia.w@earthlink.net
This is a temporary e-mail to help me catch some s-p*á/m.
------------------------------
Date: Sat, 07 Oct 2006 21:09:32 GMT
From: "Dan Mercer" <dmercer@mn.rr.com>
Subject: Re: unpack with offset (skip, X) won't work
Message-Id: <gIUVg.171$F7.79@tornado.rdc-kc.rr.com>
"Mumia W. (reading news)" <paduille.4059.mumia.w@earthlink.net> wrote in message
news:fmSVg.11252$UG4.585@newsread2.news.pas.earthlink.net...
: On 10/07/2006 12:38 PM, Mirco Wahab wrote:
: > Thus spoke Mumia W. (reading news) (on 2006-10-07 19:24):
: >> On 10/07/2006 11:51 AM, Mirco Wahab wrote:
: >>> my ($i, $j, $k, $l) = unpack 'FX3F4', $binstr;
: >> my ($i, $j, $k, $l) = unpack 'x[F3]F4', $binstr;
: >
: > Thanks for your fast and correct response. Actually,
: > I read the perlpacktut and had already figured:
: >
: > my ($i, $j, $k, $l) = unpack 'X[F3]F4', $binstr; # wrong try
: >
: > (with a large 'X') and it, of course, didn't work and
: > so I dropped this strategy and throwed the gun away ...
: >
: >> The string "x[F3]" allows you to skip the number of
: >> bytes that would make up three native floats.
: >
: > Nice, now after I know that from you, I can
: > find the place where it is said in perlpacktut ... :-)
: >
: > Regards & Thanks
: >
: > Mirco
:
: You're welcome, and thanks for pointing me to perlpacktut. I can't
: believe that Perl can uuencode without using a module!
Why not - perl can do cksum's without a module
Dan Mercer
:
: :-O
:
:
: --
: Mumia W.
: paduille.4059.mumia.w@earthlink.net
: This is a temporary e-mail to help me catch some s-p*a/m.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9819
***************************************