[22983] in Perl-Users-Digest
Perl-Users Digest, Issue: 5203 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 9 21:38:04 2003
Date: Wed, 9 Jul 2003 18:35:59 -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 Wed, 9 Jul 2003 Volume: 10 Number: 5203
Today's topics:
Re: Perl Script Problems <cwilbur@mithril.chromatico.net>
Re: Perl Script Problems <wgu_@_wurquhart.co.uk>
Re: Perl Script Problems <yyyy@yyy.com>
Re: Perl Script Problems <emschwar@pobox.com>
Re: Perl Script Problems <kkeller-spammmm@wombat.san-francisco.ca.us>
Re: Perl Script Problems <yyyy@yyy.com>
Re: Perl Script Problems <abuse@sgrail.org>
Perl script to parse web page (Kirk Larsen)
Re: Perl script to parse web page <bwalton@rochester.rr.com>
Re: Perl script to parse web page nobull@mail.com
Re: perl style guide <abigail@abigail.nl>
Prototyping C programs using Perl <sandy@fafasite.com>
Re: Prototyping C programs using Perl <abigail@abigail.nl>
Re: Prototyping C programs using Perl <sandy@fafasite.com>
Re: purpose of threads? <tigger@nospaaam.io.com>
Q- Empirical usable upper limit on hash array number of (Carlton Brown)
Re: Reading JPEG file <zvone.zagar@siol.net>
Re: Reading Lines into an Array (Joe Smith)
recommended reading <j@firepunk.net>
Re: recommended reading <bwalton@rochester.rr.com>
Re: recommended reading <noreply@gunnar.cc>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 08 Jul 2003 15:28:43 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: Perl Script Problems
Message-Id: <87znjpkpwv.fsf@mithril.chromatico.net>
tadmc@augustmail.com (Tad McClellan) writes:
> Robert <yyyy@yyy.com> wrote:
>
> > Fuck you then
>
>
> You do not seem to be the intellectual type.
But he might be good in bed, or useful to open jars.
Charlton
------------------------------
Date: Tue, 08 Jul 2003 16:35:49 +0100
From: The Sender <wgu_@_wurquhart.co.uk>
Subject: Re: Perl Script Problems
Message-Id: <dCBOa.17472$pd.8626@news-binary.blueyonder.co.uk>
At some time in the past Robert wrote :
> Any help on this would be great since its a free script there is no
> support. I have a website on a win2k server running MSFP 2002 extensions.
> The script should create a html file on the fly but it won't. The script
> is one of those post card scripts that sends an e-mail and a link to the
> card. All works fine except for the card creation. The e-mail it sends
> contains a link but when clicked you get the 404 error.
> Anybody PLEASE HELP
> Robert
Assuming you've recovered from your flaming, have you got this to function
yet? If not then put on your fireproof suit and provide us with some more
information please. In the meantime...
Well, the obvious thing here is to provide more information and also check
that the URL that is generated / used is in fact correct. I assume the page
is generated at click time and not when the postcard is created?
What happens when you use:
perl -wT postcard.pl
--
Regards,
William
------------------------------
Date: Tue, 08 Jul 2003 21:27:06 GMT
From: "Robert" <yyyy@yyy.com>
Subject: Re: Perl Script Problems
Message-Id: <KGGOa.182474$_w.7799528@twister.southeast.rr.com>
Thanks William,
Well finally some useful info. What first pissed me off was the very first
response. Then others felt the need to jump in and continue to piss me off.
I on the other hand asked a open honest question. Any way thanks all for the
flaming.
It takes way more than this little tit for tat to hurt my feelings.
Anyway I have not figured out what is wrong yet. But to answer your question
the card is generated when you click the preview button when you click send
the card should be created and an e-mail sent.
The last screen is a confirmation with what appears to be a properly
formatted URL but there is no page created thus resulting in the 404 error.
Scripts are enabled on my server and according to my web host the directory
permissions should allow the file to be written to the server.
In another more friendly group we discussed permissions and this is the
text.
So I am not sure where to go from here. I run the site as a hobby and get a
good number of visits. I just thought this would be a little neat thing to
have.
Thanks again
And to all the aholes out there keep it tight!!
the normal permissions don't allow perl scripts, ASP
pages, and the like to update content files in your site. The reason
is to keep bad guys from sneaking code into the site and running it.
If this were possible, it wouldn't be your site anymore.
From a technical point of view, it's possible to configure the Web
server so that the anonymous account *can* updated content files in
certain folder, and so that nothing in the folder can possibly execute
on the server. But if your ISP isn't willing to do this for you, than
it's not goiong to happen.
Anyway, those greeting card files are likely to chew up your disk
quota. Maybe you should for another packages that stores the variable
information in a database, and that creates and transmits the greeting
card HTML on the fly for each request.
Jim Buyens
Microsoft FrontPage MVP
buyensj@interlacken.com
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
"The Sender" <wgu_@_wurquhart.co.uk> wrote in message
news:dCBOa.17472$pd.8626@news-binary.blueyonder.co.uk...
> At some time in the past Robert wrote :
>
> > Any help on this would be great since its a free script there is no
> > support. I have a website on a win2k server running MSFP 2002
extensions.
> > The script should create a html file on the fly but it won't. The script
> > is one of those post card scripts that sends an e-mail and a link to the
> > card. All works fine except for the card creation. The e-mail it sends
> > contains a link but when clicked you get the 404 error.
> > Anybody PLEASE HELP
> > Robert
>
> Assuming you've recovered from your flaming, have you got this to function
> yet? If not then put on your fireproof suit and provide us with some more
> information please. In the meantime...
>
> Well, the obvious thing here is to provide more information and also check
> that the URL that is generated / used is in fact correct. I assume the
page
> is generated at click time and not when the postcard is created?
>
> What happens when you use:
>
> perl -wT postcard.pl
>
> --
> Regards,
>
> William
------------------------------
Date: 08 Jul 2003 16:02:38 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Perl Script Problems
Message-Id: <etoel10ad8h.fsf@wormtongue.emschwar>
"Robert" <yyyy@yyy.com> writes:
> Well finally some useful info. What first pissed me off was the very
> first response. Then others felt the need to jump in and continue to
> piss me off. I on the other hand asked a open honest question.
There are Posting Guidelines that are posted to this newsgroup
regularly. You really should read them first, before posting. One of
the most important guidelines is this:
* Nobody can help you if you don't post code.
The second most important one is:
* Post the absolutely smallest amount of code required to reproduce
the problem. If you post a 5000 line program, nobody will want to
read it and dissect it for you (unless you're willing to offer a
contract, and I go for $150/hr, two hour minimum paid in advance).
Your "open, honest question" can be summed up as, "Something's wrong.
I don't know what. What's the problem?" You may like it or not, but
that approach is very frustrating, and gives nobody any information
that we can actually use to help.
> Any way thanks all for the flaming.
The point of the "syntax error on line 17" and the like is to point
out that you haven't shown us any code.
> It takes way more than this little tit for tat to hurt my feelings.
Nobody's trying to hurt your feelings; I think the most that anyone
wants is for you to learn the rules before you try to ask questions.
> Anyway I have not figured out what is wrong yet. But to answer your
> question the card is generated when you click the preview button
> when you click send the card should be created and an e-mail sent.
That says nothing useful at all. We don't know what the code that
generates this "preview" button, I personally can't tell if you're
supposed to click 'send' before or after clicking 'preview', and
nobody knows how the card is created, or the email sent.
This description is useless in helping anyone discover what is going
on, much less what is going wrong.
> The last screen is a confirmation with what appears to be a properly
> formatted URL but there is no page created thus resulting in the 404
> error.
And this means... what, exactly? I can come up with at least three
valid interpretations off the top of my head, and I honestly can't
tell which one you meant. Nor can anyone else, I wager.
> Scripts are enabled on my server and according to my web host the
> directory permissions should allow the file to be written to the
> server.
What directory? What file? What server? You've said *nothing* with
this sentence.
> In another more friendly group we discussed permissions and this is the
> text.
What is the text?
> So I am not sure where to go from here. I run the site as a hobby
> and get a good number of visits. I just thought this would be a
> little neat thing to have.
What would be a 'little neat thing to have'? Nobody yet has any idea
what you're trying to do, how you're trying to do it, or if anything
even makes sense.
> Thanks again
> And to all the aholes out there keep it tight!!
You know, the 'aholes' you refer to have collectively more published
Perl books than probably anyone else (and theirs are better-reviewed,
as well). Good job pissing them off. I'm not even inclined to help
myself, other than to point out exactly how you went wrong in the
first place.
-=Eric
------------------------------
Date: Tue, 8 Jul 2003 15:03:33 -0700
From: Keith Keller <kkeller-spammmm@wombat.san-francisco.ca.us>
Subject: Re: Perl Script Problems
Message-Id: <l3ffeb.00h.ln@goaway.wombat.san-francisco.ca.us>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In article <KGGOa.182474$_w.7799528@twister.southeast.rr.com>, Robert wrote:
> It takes way more than this little tit for tat to hurt my feelings.
[snip rest of TOFU]
Obviously not.
Did I miss it, or have you posted anything Perl yet?
*plonk*
- --keith
- --
kkeller-mmmspam@wombat.san-francisco.ca.us
(try just my userid to email me)
alt.os.linux.slackware FAQ: http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAj8LP7QACgkQhVcNCxZ5ID8hvQCcDEnBEbLmdC/C+8V4AD5CSmnz
OIkAn1O40ZBKrdVzWf93vjkKOw31YDbJ
=1iHv
-----END PGP SIGNATURE-----
------------------------------
Date: Wed, 09 Jul 2003 10:27:55 GMT
From: "Robert" <yyyy@yyy.com>
Subject: Re: Perl Script Problems
Message-Id: <L6SOa.245696$jp.6831963@twister.southeast.rr.com>
Well I thought that who ever wanted to offer advice would first say
something to the effect "Would line to help send more info"
and we would go from there as for pissing people off hey somebody started it
but it wasn't me.
As it turns out the issue seems be permissions on the server
Thanks for the help.
"Keith Keller" <kkeller-spammmm@wombat.san-francisco.ca.us> wrote in message
news:l3ffeb.00h.ln@goaway.wombat.san-francisco.ca.us...
> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
>
> In article <KGGOa.182474$_w.7799528@twister.southeast.rr.com>, Robert
wrote:
> > It takes way more than this little tit for tat to hurt my feelings.
> [snip rest of TOFU]
>
> Obviously not.
>
> Did I miss it, or have you posted anything Perl yet?
>
> *plonk*
>
> - --keith
>
> - --
> kkeller-mmmspam@wombat.san-francisco.ca.us
> (try just my userid to email me)
> alt.os.linux.slackware FAQ: http://wombat.san-francisco.ca.us/cgi-bin/fom
>
> -----BEGIN xxx SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iEYEARECAAYFAj8LP7QACgkQhVcNCxZ5ID8hvQCcDEnBEbLmdC/C+8V4AD5CSmnz
> OIkAn1O40ZBKrdVzWf93vjkKOw31YDbJ
> =1iHv
> -----END PGP SIGNATURE-----
------------------------------
Date: Wed, 09 Jul 2003 11:00:11 GMT
From: derek / nul <abuse@sgrail.org>
Subject: Re: Perl Script Problems
Message-Id: <natngvkt8s7el5j7sfvr7kl761m1db10ku@4ax.com>
On Wed, 09 Jul 2003 10:27:55 GMT, "Robert" <yyyy@yyy.com> wrote:
>Well I thought that who ever wanted to offer advice would first say
>something to the effect "Would line to help send more info"
That was said by me.
You are still top posting, I don't think you are listening!!
>and we would go from there as for pissing people off hey somebody started it
>but it wasn't me.
>As it turns out the issue seems be permissions on the server
nothing to do with perl eh, then why post here?
>Thanks for the help.
>
>"Keith Keller" <kkeller-spammmm@wombat.san-francisco.ca.us> wrote in message
>news:l3ffeb.00h.ln@goaway.wombat.san-francisco.ca.us...
>> -----BEGIN xxx SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> In article <KGGOa.182474$_w.7799528@twister.southeast.rr.com>, Robert
>wrote:
>> > It takes way more than this little tit for tat to hurt my feelings.
>> [snip rest of TOFU]
>>
>> Obviously not.
>>
>> Did I miss it, or have you posted anything Perl yet?
>>
>> *plonk*
>>
>> - --keith
>>
>> - --
>> kkeller-mmmspam@wombat.san-francisco.ca.us
>> (try just my userid to email me)
>> alt.os.linux.slackware FAQ: http://wombat.san-francisco.ca.us/cgi-bin/fom
>>
>> -----BEGIN xxx SIGNATURE-----
>> Version: GnuPG v1.0.6 (GNU/Linux)
>> Comment: For info see http://www.gnupg.org
>>
>> iEYEARECAAYFAj8LP7QACgkQhVcNCxZ5ID8hvQCcDEnBEbLmdC/C+8V4AD5CSmnz
>> OIkAn1O40ZBKrdVzWf93vjkKOw31YDbJ
>> =1iHv
>> -----END PGP SIGNATURE-----
>
------------------------------
Date: 8 Jul 2003 12:33:35 -0700
From: spamme@kirklarsen.com (Kirk Larsen)
Subject: Perl script to parse web page
Message-Id: <4628ab88.0307081133.2172ef5@posting.google.com>
I'm a perl newbie, so don't laugh. I am looking to write a perl
script to run in a windows environment that will check a particular
URL for a link that contains the date in the format yymmdd and will
then grab that link target and email it through a local smtp server.
Is there any sample scripts out there that I can look at or that can
be posted? Thanks in advance.
------------------------------
Date: Wed, 09 Jul 2003 01:12:12 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl script to parse web page
Message-Id: <3F0B6BE1.5060803@rochester.rr.com>
Kirk Larsen wrote:
> I'm a perl newbie, so don't laugh. I am looking to write a perl
> script to run in a windows environment that will check a particular
> URL for a link that contains the date in the format yymmdd and will
> then grab that link target and email it through a local smtp server.
> Is there any sample scripts out there that I can look at or that can
> be posted? Thanks in advance.
>
Modules are your friends:
use LWP::Simple;
to grab the HTML for your URL, then:
use HTML::Parser;
or maybe
use HTML::LinkExtor;
to parse the HTML. Then:
use Net::SMTP;
to generate the email. To see the docs for a module, do:
perldoc Module::Name
at a command prompt.
--
Bob Walton
------------------------------
Date: 9 Jul 2003 10:27:38 -0700
From: nobull@mail.com
Subject: Re: Perl script to parse web page
Message-Id: <4dafc536.0307090927.51b719f@posting.google.com>
spamme@kirklarsen.com (Kirk Larsen) wrote in message news:<4628ab88.0307081133.2172ef5@posting.google.com>...
> I'm a perl newbie, so don't laugh. I am looking to write a perl
> script to run in a windows environment that will check a particular
> URL for a link that contains the date in the format yymmdd and will
> then grab that link target and email it through a local smtp server.
> Is there any sample scripts out there that I can look at or that can
> be posted? Thanks in advance.
Your question consists of two FAQ. Examples can be found in the
documentation that comes with the modules tow which the FAQ directs
you.
------------------------------
Date: 08 Jul 2003 20:00:51 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: perl style guide
Message-Id: <slrnbgm8ni.jme.abigail@alexandra.abigail.nl>
jdurick (jdurick@mitre.org) wrote on MMMDXCVIII September MCMXCIII in
<URL:news:beevei$hke$1@newslocal.mitre.org>:
~~ Besides the one on perldoc.com, does anyone else have any other style guides
~~ I can take a look at to get a look at feel for which one I should use? Any
~~ help would be appreciated.
http://perl.abigail.nl/Musings/coding_guidelines.html
Abigail
--
use lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";
------------------------------
Date: Wed, 9 Jul 2003 21:31:11 +0800
From: "Sandy" <sandy@fafasite.com>
Subject: Prototyping C programs using Perl
Message-Id: <beh56r$206g$1@justice.itsc.cuhk.edu.hk>
I would like to write a perl program as a prototype for a program which will
eventually be written in C, would this alter how I write the Perl prototype?
In what ways? What features of Perl should I use to ease the process?
------------------------------
Date: 09 Jul 2003 13:41:45 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Prototyping C programs using Perl
Message-Id: <slrnbgo6so.psj.abigail@alexandra.abigail.nl>
Sandy (sandy@fafasite.com) wrote on MMMDXCIX September MCMXCIII in
<URL:news:beh56r$206g$1@justice.itsc.cuhk.edu.hk>:
.. I would like to write a perl program as a prototype for a program which will
.. eventually be written in C, would this alter how I write the Perl prototype?
.. In what ways? What features of Perl should I use to ease the process?
It depends on the purpose of your prototype. It's a bad idea to prototype
in Perl if you want to get an impression of the speed or memory usage of
the program. If you want to prototype a user interface, the implementation
hardly matters. What also matter is whether the resulting program will
be written entirely in pure C, C calling Perl, or Perl calling C.
Abigail
--
:;$:=~s:
-:;another Perl Hacker
:;chop
$:;$:=~y
:;::d;print+Just.
$:;
------------------------------
Date: Wed, 9 Jul 2003 21:57:54 +0800
From: "Sandy" <sandy@fafasite.com>
Subject: Re: Prototyping C programs using Perl
Message-Id: <beh6ou$211e$1@justice.itsc.cuhk.edu.hk>
Thanks a lot :)
Actually, I plan to write the program in pure C eventually.
BTW, is there any feature of Perl that can effectively be employed for the
purpose of prototyping a pure C program in particular?
Thanks in advance.
"Abigail" <abigail@abigail.nl> ¼¶¼g©ó¶l¥ó
news:slrnbgo6so.psj.abigail@alexandra.abigail.nl...
> Sandy (sandy@fafasite.com) wrote on MMMDXCIX September MCMXCIII in
> <URL:news:beh56r$206g$1@justice.itsc.cuhk.edu.hk>:
> .. I would like to write a perl program as a prototype for a program
which will
> .. eventually be written in C, would this alter how I write the Perl
prototype?
> .. In what ways? What features of Perl should I use to ease the process?
>
>
> It depends on the purpose of your prototype. It's a bad idea to prototype
> in Perl if you want to get an impression of the speed or memory usage of
> the program. If you want to prototype a user interface, the implementation
> hardly matters. What also matter is whether the resulting program will
> be written entirely in pure C, C calling Perl, or Perl calling C.
>
>
>
> Abigail
> --
> :;$:=~s:
> -:;another Perl Hacker
> :;chop
> $:;$:=~y
> :;::d;print+Just.
> $:;
------------------------------
Date: Tue, 08 Jul 2003 21:35:53 -0500
From: Paul Archer <tigger@nospaaam.io.com>
Subject: Re: purpose of threads?
Message-Id: <R9OdnVRb3_MU4paiXTWJiA@io.com>
Juha Laiho <Juha.Laiho@iki.fi> spewed forth with:
> Where threads fit are situations where you're doing multiple tasks
> simultaneously (in parallel), and the tasks have much data to interchange
> with each other. You could do this with several processes and various
> forms of IPC, too, but communication between processes is expensive
> in terms of CPU use. So, threads lower the CPU utilization by reducing
> the need for IPC, and can also reduce communications latency when
> compared to multiple processes exchanging data.
As a relatively poor example of this, I'm writing a threaded YACMP (Yet
Another Car Mp3 Player) application. Different threads handle reading from
the app actually doing the decoding (currently rxaudio, but may change to
mpg123), the buttons for input, etc. I suppose it could be done with forking
instead, but it works for me. Whether you're forking or threading, an advantage
is that if one part blocks (like waiting for user input), the rest keeps
running.
Paul Archer
------------------------------
Date: 9 Jul 2003 07:38:09 -0700
From: carltonbrown@hotmail.com (Carlton Brown)
Subject: Q- Empirical usable upper limit on hash array number of elements
Message-Id: <aa611a32.0307090638.23f8297f@posting.google.com>
I'm trying to work a simple union problem that will result in some
extremely large hashes (minimum 2 million elements, possibly up to 100
million at some point, no key or value will be larger than 64 bytes).
So I'm wondering if anyone has had practical experience using hashes
with extremely large numbers of elements, and if so, did you encounter
any logical or practical limit? Has anyone used hashes of up to 100
million elements without experiencing unreasonable slowness or
unpredictable behavior?
All the docs (that I've read) say that there is no limit on the size
of a hash in PERL. But in my experience, when documentation says "no
limit" on a spec, it means the limit lies outside the boundaries of
what anyone has tested.
A quick "Fermi problem" review of the expected orders of magnitude
shows that these data structures shouldn't consume more than 12GB of
memory (unless of course there exists some non-trivial overhead that I
don't know about). This will be run on a machine with 24GB of
physical RAM and 24GB of virtual memory, so memory should not be a
problem.
The essence of the problem is to take extremely large list A, compare
it to slightly smaller list B, and identify the elements from list A
that are not found in list B.
Thanks in advance.
------------------------------
Date: Wed, 09 Jul 2003 01:22:03 +0200
From: Zvone Zagar <zvone.zagar@siol.net>
Subject: Re: Reading JPEG file
Message-Id: <HnIOa.101$2B6.20527@news.siol.net>
Bryan Castillo wrote:
> Zvone Zagar <zvone.zagar@siol.net> wrote in message
> news:<1a8Oa.55$2B6.10574@news.siol.net>...
>> A. Sinan Unur wrote:
>>
>> > Zvone Zagar <zvone.zagar@siol.net> wrote in
>> > news:7HGNa.22$2B6.2874@news.siol.net:
>> >
>> >> A. Sinan Unur wrote:
>> >>
>> >>> Zvone Zagar <zvone.zagar@siol.net> wrote in news:iafNa.2024$78.139057
>> >>> @news.siol.net:
>> >>>
>> >>>> A. Sinan Unur wrote:
>> >>>>
>> >>>>> Zvone Zagar <zvone.zagar@siol.net> wrote in
>> >>>>> news:GdKLa.1908$78.104444@news.siol.net:
>> >>>>>
>> >>>>>> I would like to read a jpg image, get data (decode) out of it and
>> >>>>>> make a postscript file from scratch. I can get width, height,
>> >>>>>> color depth but I don't know how to make a hex string needed for
>> >>>>>> postscript. Postscript line should look like: width height depth
>> >>>>>> matrix {<hex data>} false 3 colorimage.
>> ...
>> >>>>> ImageMagick can save image data in raw RGB format. Although I have
>> >>>>> never used it, and do not have it installed, I thought pointing
>> >>>>> that out might help.
>> >>>>>
>> >>>>> Sinan.
>> >>>> I appologize for my late answer.
>> >>>> The raw RGB format is unfortunately not the proper one.
>> >>>> At first my lips smiled, but code generated is not PS digested.
>> >>>> I will dig deeper.
>> >>>
>> >>> If I understand correctly, you need to get to the raw RGB data
>> >>> somehow (I have no idea how one embeds jpegs in postscript), and then
>> >>> insert those data in the document as ascii hexadecimal numbers. Is
>> >>> that the case? If so, once you get the raw RGB data, you can easily
>> >>> get what you want. So, raw RGB would not be the solution to your
>> >>> problem, but the first step in a solution.
>> >
>> > <snip>
>> >
>> >> I really appreciate your effort. I set up temporary site at
>> >> http:/freeweb.siol.net/an511zvo where some examples will clarify my
>> >> intentions (I hope).
>> >
>> > It does. And thank you for posting a link rather than the actual files.
>> >
>> >> The Tk script creates a ps file. That is what I
>> >> want to make, but not using Tk. I would like to make text (console)
>> >> application which creates postscript file. File (I stripped off
>> >> unnecessary ps code) raptor2.ps is what I want to get at. The hex code
>> >> between curly braces and <> is the hex string which makes me
>> >> perplexed. I think that raw RGB data is the first step, too.
>> >
>> > OK, so you are trying to do what I thought you were trying to do. Go
>> > ahead and:
>> >
>> > 1. Decode the JPEG image into raw RGB format using ImageMagick
>> >
>> > 2. Print the value of each octet in the raw RGB data in hex, 66
>> > characters per line
>> >
>> > 3. For the second part, printf and/or sprintf are your friends.
>> >
>> > This should not take a lot of code. If you run into problems, post your
>> > code here.
>
> Sounds like a pretty cool script. Even if it works, I would
> like to see it and read it.
>
>> >
>> >> p.s. My appreciation was not empty words
>> >
>> > Never thought it was. You are welcome.
>> >
>> > Sinan.
>> Thanks
>>
>> Zvone
Hello!
I made very rudimentary perl script which produces postcript file.
Temporary link is http://freeweb.siol.net/an511zvo
It not quite what I imagined,but it works. At least for JPEG files.
It may encourage somebody to make a better one.
Zvone Zagar
------------------------------
Date: Wed, 09 Jul 2003 06:18:53 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: Reading Lines into an Array
Message-Id: <htOOa.290$603.15826@iad-read.news.verio.net>
In article <82494aaf900ecc16d654970167a0f4db@free.teranews.com>,
nreedr <infomatic@aol.com> wrote:
>
>You're right. I did not state what I was actually trying to accomplish. I
>guess after a while I just wanted to get the array working. All I wanted to
>do was store a variable number of URL's in an array, sort them and output a
>sorted list. The code snippet I provided is several iterations removed from
>my original algorithm. I'm sure there are probably modules or code out there
>that'll do exactly what I'm trying to do and probably way better than
>anything I could design. I've already created a working Perl utility that
>will remove dups from a sorted list. I just need one that works for any
>list.
The list does not have to be sorted to remove duplicates.
Just use a hash instead of an array.
my %seen; # Hash of URLs that have been seen already
my @to_do; # Array of unique URLs (in order found)
foreach (@potential_urls) {
push @to_do,$_ unless $seen{$_}++;
}
If you're planning to handle URLs in alphabetical order instead of
in the order they are in the input, you can use this:
$seen{$_}++ foreach @potential_urls;
@to_do = sort keys %seen;
> If you can please recommend the following:
>(a) Any available code and/or module that will do the trick
>(b) Any decent free Perl tutorial or documentation that would help with this
>(the doc that comes with Active Perl is extremely extensive but frequently
>lacks real-world examples)
>Chow ;-)
How about a link-checker? Randal Schwartz wrote 'slinky'.
http://www.stonehenge.com/merlyn/WebTechniques/col35.html
Check out his other columns for real-world examples, or go buy
the Perl Cookbook, 2nd edition, when it becomes available in August.
http://www.oreilly.com/catalog/perlckbk2/
http://www.oreilly.com/catalog/cookbook/
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Tue, 8 Jul 2003 18:35:58 -0700
From: "dasd" <j@firepunk.net>
Subject: recommended reading
Message-Id: <vgms7d9ct9k9ef@corp.supernews.com>
Hello all,
I'm new to this group, and I was wondering if you folks had any specific
books that you would recommend as being "extremely great" for newbs. I know
some c/c++, VB, basic, java.... and I would like to pick up perl. Any
suggestions are welcome, as long as it isn't to take a long walk off a short
pier.
Thanks
------------------------------
Date: Wed, 09 Jul 2003 01:43:57 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: recommended reading
Message-Id: <3F0B735D.7050404@rochester.rr.com>
dasd wrote:
...
> I'm new to this group, and I was wondering if you folks had any specific
> books that you would recommend as being "extremely great" for newbs. I know
> some c/c++, VB, basic, java.... and I would like to pick up perl. Any
> suggestions are welcome, as long as it isn't to take a long walk off a short
> pier.
...
perldoc perlbook
perldoc -q book
--
Bob Walton
------------------------------
Date: Wed, 09 Jul 2003 04:07:42 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: recommended reading
Message-Id: <beftma$4sd5r$1@ID-184292.news.dfncis.de>
Bob Walton wrote:
> dasd wrote:
>> I'm new to this group, and I was wondering if you folks had any
>> specific books that you would recommend as being "extremely
>> great" for newbs. I know some c/c++, VB, basic, java.... and I
>> would like to pick up perl. Any suggestions are welcome, as long
>> as it isn't to take a long walk off a short pier.
>
> perldoc perlbook
> perldoc -q book
Or to 'translate' for somebody who _would like to_ learn Perl:
http://www.perldoc.com/perl5.8.0/pod/perlfaq2.html#Perl-Books
Another tip:
http://learn.perl.org/
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
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 5203
***************************************