[8841] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2458 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 29 22:07:52 1998

Date: Wed, 29 Apr 98 19:00:35 -0700
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, 29 Apr 1998     Volume: 8 Number: 2458

Today's topics:
    Re: 1701 days hath September (was: Re: rename funciton) (John Stanley)
    Re: 1701 days hath September (was: Re: rename funciton) <sowmaster@juicepigs.com>
    Re: 1701 days hath September (was: Re: rename funciton) <rjk@coos.dartmouth.edu>
    Re: Bible References converted into Text <bwatson@mindspring.com>
    Re: Bible References converted into Text (Sharon Hopkins)
    Re: Bill Gates should be invited to O'Reilly's "Free So <rasmusin@WPI.EDU>
    Re: books for learning perl <sheri.codiana@nospam.cellnet.com>
    Re: books for learning perl <sheri.codiana@nospam.cellnet.com>
    Re: books for learning perl <sheri.codiana@nospam.cellnet.com>
        Cannot find an answer to this one - Any Ideas??? <brhess@email.msn.com>
    Re: Credit Card Verification scripts? (I R A Aggie)
    Re: Date of last change of any file (Hunter Johnson)
    Re: Dateinamen + Datum letzte Aenderung <tanr@vancpower.com>
    Re: Defending Perl (Ilya Zakharevich)
        Detecting Uncaught Exceptions at Compile Time <stevegt@TerraLuna.org>
        Downloading binary file with Perl script <brandon@xmission.com>
    Re: Downloading binary file with Perl script <rootbeer@teleport.com>
    Re: e-mail notifier that will notify by e-mail <phillip@javanet.com>
    Re: Grabbing a webpage with Perl <jamesr@aethos.co.uk.nospam>
        Helping each other (was: Credit Card Verification) <rootbeer@teleport.com>
    Re: How do I upload??? <sowmaster@juicepigs.com>
        How to do sort -u within perl? (David Lee Lambert)
    Re: How to find the number of matches in a string (John Moreno)
        How to patch a binary file ? <shtil@netcom.com>
    Re: How to patch a binary file ? <rootbeer@teleport.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 30 Apr 1998 00:33:24 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <6i8gsk$3tm$1@news.NERO.NET>

In article <6i7k6s$fbo$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, 
>    Bob Trieger <sowmaster@juicepigs.com> writes:
>:Change happens and all you can do is enjoy it. 
>
>Tell that to the person getting raped.

Let's see. Bob was talking about newsgroup changes. Tom is talking
about rape. Hmmm..... No, I don't think even the wildest stretch of
imagination can justify that comparison.

Will the same people who are contributing to this topic be the same
ones who vote yes for a moderated group, if it is ever brought to a
vote, because they don't like the noise in the current group? 



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

Date: Wed, 29 Apr 1998 15:25:08 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <35477E94.477D@juicepigs.com>

I R A Aggie wrote:
> 
> In article <354740A4.573B@juicepigs.com>, Bob Trieger
> <sowmaster@juicepigs.com> wrote:
> 
> + Change happens and all you can do is enjoy it.
> 
> Even if the change is NOT beneficial?

YES! Perhaps the most then. It does you no good to get ulcers over
something that you can not keep from changing.
 
> I think you _really_ need to contemplate your statement, and its pratical
> implications in your daily life.
> 
> Some change is good, and it needs to be fostered.
> Some change is bad, and it needs to be opposed.

The only way to oppose a change that has taken place is to make another
change.
 
> The constant September, and the providers that just dump their users
> out on the net without proper instruction, needs to be opposed. It improves
> things for everyone.

Harassing the poor lamers that are getting dumped onto USENET without a
clue is not going to help your cause. 

-- 
Bob Trieger               |  Titanic: big boat, bigger
sowmaster@juicepigs.com   |           iceberg, big deal


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

Date: Wed, 29 Apr 1998 21:22:25 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <3547D251.C9D384C2@coos.dartmouth.edu>

John Stanley wrote:
> 
> In article <6i7k6s$fbo$1@csnews.cs.colorado.edu>,
> Tom Christiansen  <tchrist@mox.perl.com> wrote:
> > [courtesy cc of this posting sent to cited author via email]
> >
> >In comp.lang.perl.misc,
> >    Bob Trieger <sowmaster@juicepigs.com> writes:
> >:Change happens and all you can do is enjoy it.
> >
> >Tell that to the person getting raped.
> 
> Let's see. Bob was talking about newsgroup changes. Tom is talking
> about rape. Hmmm..... No, I don't think even the wildest stretch of
> imagination can justify that comparison.

Hitler.

Well, I guess that takes care of that thread.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Wed, 29 Apr 1998 19:44:15 -0400
From: Bill Watson <bwatson@mindspring.com>
To: Arthur Gibbs <"nospam"@aol.com>>really Gibbs at Cheerful.com>
Subject: Re: Bible References converted into Text
Message-Id: <3547BB35.5744@mindspring.com>

Arthur Gibbs wrote:
> 
> Anyone know of a perl program that easily translates Bible references into
> texts from a flat file text database?

You can put a link from your page to goshen.net, where a reference to
text
script exists. You can even pick which bible version you which to
reference.

Regards,
Bill

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bill Watson                                        Internet Consultant
          Consultation Training Web Page Creation/Hosting
http://www.gonc.com/                            bwatson@mindspring.com
Durham,NC                                        Phone: 1-919-493-9880


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

Date: Wed, 29 Apr 1998 23:58:30 GMT
From: sharon@kithrup.com (Sharon Hopkins)
Subject: Re: Bible References converted into Text
Message-Id: <Es799I.3GG@kithrup.com>

[posted & mailed]

In article <35479759.0@news1.ibm.net>, Arthur Gibbs <nospam@aol.com> wrote:
>Anyone know of a perl program that easily translates Bible references into
>texts from a flat file text database?
>
>1 John 3:16-20,22 into the Bible text itself?
>or 1 John 3:16-17;4:1-2
>or 1 John 3:16,19,20
>
>Thanks!!!
>
>E-mail:
>
>Gibbsa
>[--@--]
>andrews.edu

I have a copy of a very simple little bible-lookup program Larry wrote
quite a while back called "concord", which does lookups on a flat-text
KJV translation.  The bible setup is that it's divided into books,
with filenames like 01.genesis, 02.exodus, etc.  Each verse is on its
own line, e.g.:

ranma:sharon <117> head 01.genesis
GEN 1:1  In the beginning God created the heaven and the earth.

GEN 1:2  And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.

etc.

You call concord with the name of the book as an arg (or other indicators,
like "johanine" or "gospel", or "pent", or "nt" or "ot"), and give
it a pattern, which could either be a word you're looking for in
the text or a reference number.

E.g. 'concord -john 3:16' returns:

JOH 3:16  For God so loved the world, that he gave his only begotten Son,
    that whosoever believeth in him should not perish, but have everlasting
    life.
JOH 13:16  Verily, verily, I say unto you, The servant is not greater than
    his lord; neither he that is sent greater than he that sent him.
JO1 3:16  Hereby perceive we the love of God, because he laid down his life
    for us: and we ought to lay down our lives for the brethren.

Which at least includes what you want. :-)

I can tar the bible bundle up for you if you like and email or ftp
it to you (I'm told it's PD); the script is included below.

On the other hand, if what you really want is just a quick way to look
up verses, check out The WWW Bible Gateway:

http://bible.gospelcom.net/bible?

which is quite nice and has half-a-dozen translations available.

--Sharon Hopkins
  sharon@kithrup.com

-------------------------- cut here -------------------------
#!/usr/bin/perl

# #!/usr/local/bin/perl5.001

chdir "/usr/pub/bible" || die "No bible on this machine\n";

while ($ARGV[0] =~ s/^-//) {
    $name = shift;
    $bookpat .= "\\b$name|";
}

$pat = "@ARGV";

if ($bookpat ne '') {
    chop($bookpat);
}
else {
    $bookpat = '^\d';
}

@ARGV = ();
while (<DATA>) {
    next unless /$bookpat/;
    ($name) = split(' ');
    push(@ARGV, $name);
}

while (<>) {
    write if /$pat/oi;
}

format STDOUT =
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$_
~~  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$_
 .

__END__
01.genesis              ot      pentateuch
02.exodus               ot      pentateuch
03.leviticus            ot      pentateuch
04.numbers              ot      pentateuch
05.deuteronomy          ot      pentateuch
06.joshua               ot      history israel
07.judges               ot      history israel
08.ruth                 ot      history israel
09.1-samuel             ot      history israel
10.2-samuel             ot      history israel
11.1-kings              ot      history israel
12.2-kings              ot      history israel
13.1-chronicles         ot      history israel
14.2-chronicles         ot      history israel
15.ezra                 ot      history israel
16.nehemiah             ot      history israel
17.esther               ot      history israel
18.job                  ot      wisdom poetry
19.psalms               ot      wisdom poetry
20.proverbs             ot      wisdom poetry
21.ecclesiastes         ot      wisdom poetry
22.song-of-solomon      ot      wisdom poetry
23.isaiah               ot      prophetic major
24.jeremiah             ot      prophetic major
25.lamentations         ot      prophetic major
26.ezekiel              ot      prophetic major
27.daniel               ot      prophetic major
28.hosea                ot      prophetic minor
29.joel                 ot      prophetic minor
30.amos                 ot      prophetic minor
31.obadiah              ot      prophetic minor
32.jonah                ot      prophetic minor
33.micah                ot      prophetic minor
34.nahum                ot      prophetic minor
35.habakkuk             ot      prophetic minor
36.zephaniah            ot      prophetic minor
37.haggai               ot      prophetic minor
38.zechariah            ot      prophetic minor
39.malachi              ot      prophetic minor
40.matthew              nt      gospel synoptic
41.mark                 nt      gospel synoptic
42.luke                 nt      gospel synoptic
43.john                 nt      gospel                  johanine
44.acts                 nt      history church
45.romans               nt      epistle general         pauline
46.1-corinthians        nt      epistle general         pauline
47.2-corinthians        nt      epistle general         pauline
48.galatians            nt      epistle general         pauline
49.ephesians            nt      epistle general         pauline
50.philippians          nt      epistle general         pauline
51.colossians           nt      epistle general         pauline
52.1-thessalonians      nt      epistle general         pauline
53.2-thessalonians      nt      epistle general         pauline
54.1-timothy            nt      epistle pastoral        pauline
55.2-timothy            nt      epistle pastoral        pauline
56.titus                nt      epistle pastoral        pauline
57.philemon             nt      epistle general         pauline
58.hebrews              nt      epistle general
59.james                nt      epistle general
60.1-peter              nt      epistle general
61.2-peter              nt      epistle general
62.1-john               nt      epistle general         johanine
63.2-john               nt      epistle general         johanine
64.3-john               nt      epistle general         johanine
65.jude                 nt      epistle general
66.revelation           nt      prophetic               johanine
-------------------------- cut here -------------------------


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

Date: 29 Apr 1998 18:31:05 -0400
From: Frank Sweetser <rasmusin@WPI.EDU>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <87wwc8dzva.fsf@paramount.res.wpi.net>

Oleg Dulin <dulino@ulticom.nvo.com> writes:

> > I keep imagining a musical piece called Dueling Bootsectors...
> 
> 
> Yeah... (defun question(To-be) (OR (To-be (NOT To-be))))

heh... perfer perl myself...

sub question{
	2*b || ! 2*b;
}

-- 
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.res.wpi.net RH 5.0 kernel 2.0.33/2.1.99   i586 | at public servers
"sic transit discus mundi"
(From the System Administrator's Guide, by Lars Wirzenius)


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

Date: Wed, 29 Apr 1998 13:08:13 -0700
From: Sheri Codiana <sheri.codiana@nospam.cellnet.com>
To: jason bass <jkbass@netnet.net>
Subject: Re: books for learning perl
Message-Id: <354788AD.1569C1AA@nospam.cellnet.com>

I used the O'Reilley "Nutshell" books, i.e. Learning Perl and
Programming Perl. Very good.

Sheri

jason bass wrote:
> 
> hello i'm new to perl and i would like to know if there are any good
> books for learning perl
> i already have perl 5 for dummies but it seems the author wrote the book
> for people that
> are already familier with other programming languages.
> please help i want to learn so bad, it seems so interesting.
> thanks
> jason


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

Date: Wed, 29 Apr 1998 13:10:45 -0700
From: Sheri Codiana <sheri.codiana@nospam.cellnet.com>
To: jason bass <jkbass@netnet.net>
Subject: Re: books for learning perl
Message-Id: <35478945.507568E2@cellnet.com>

I used the O'Reilley "Nutshell" books, i.e. Learning Perl and
Programming Perl. Very good.

Sheri

jason bass wrote:
> 
> hello i'm new to perl and i would like to know if there are any good
> books for learning perl
> i already have perl 5 for dummies but it seems the author wrote the book
> for people that
> are already familier with other programming languages.
> please help i want to learn so bad, it seems so interesting.
> thanks
> jason


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

Date: Wed, 29 Apr 1998 13:09:02 -0700
From: Sheri Codiana <sheri.codiana@nospam.cellnet.com>
To: jason bass <jkbass@netnet.net>
Subject: Re: books for learning perl
Message-Id: <354788DE.1CA4153A@cellnet.com>

I used the O'Reilley "Nutshell" books, i.e. Learning Perl and
Programming Perl. Very good.

Sheri

jason bass wrote:
> 
> hello i'm new to perl and i would like to know if there are any good
> books for learning perl
> i already have perl 5 for dummies but it seems the author wrote the book
> for people that
> are already familier with other programming languages.
> please help i want to learn so bad, it seems so interesting.
> thanks
> jason


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

Date: Wed, 29 Apr 1998 16:10:03 -0400
From: "Bill Hess" <brhess@email.msn.com>
Subject: Cannot find an answer to this one - Any Ideas???
Message-Id: <#yON5u6c9GA.152@upnetnews03>

I was using Activeware Perl 5.003 with two modules which had .pll files in
them.
I am now using Standard Perl 5.004_04 and I want to use the two modules with
it.

I thought copying the files into the appropriate directories would work,
because I have done this successfully before in UNIX, but this was not the
case on Win32

I have noticed that all of the modules on the standard Perl 5.004 come with
 .lib libraries and not .pll - What is the difference and should these be
treated differently?

Bill Hess
brhess@msn.com




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

Date: Wed, 29 Apr 1998 16:07:57 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Credit Card Verification scripts?
Message-Id: <fl_aggie-2904981607570001@aggie.coaps.fsu.edu>

In article <01bd736f$47a4f900$26c0a4c1@kitkat.aethos.co.uk>, "James
Richardson" <jamesr@aethos.co.uk.nospam> wrote:

+ Tom Phoenix <rootbeer@teleport.com> wrote in article
<Pine.GSO.3.96.980428094649.15049H-100000@user2.teleport.com>...
+ > In any case, c.l.p.misc is not a help desk. If no one answers your
+ > questions, that's more likely to be your fault than ours! :-)

+ So what is it then?

A miscellaneous discussion group that is interested in things relating
to the perl programming language. Poor subject lines, incomprehensible
questions, illegible line wrapping are some of the reasons questions
get dumped on the floor like used peanut shells...

+ I was under the impression that that was exactly what it was....

You would be wrong.

James - the other one

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: 29 Apr 1998 20:11:55 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Re: Date of last change of any file
Message-Id: <6i81ib$4f1@mailgate.lexis-nexis.com>

In article <35471590.4992CB3@htwm.de>,
Arne Steinbacher  <asteinba@htwm.de> wrote:

> how can I find out the date of the last change of any file ?

Of a particular file?  You can use stat() to get $mtime; see the
perlfunc man page.

Hunter
--
J. Hunter Johnson        | "A little consistent wholesome modeling and
jhunterj@lexis-nexis.com |   costly servanthood are worth millions of
(937) 865-6800 x5385     |    true words harshly spoken."
Lexis-Nexis, Dayton, OH  |                               -- Ron Sider


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

Date: Wed, 29 Apr 1998 15:21:15 -0400
From: Richard Tan <tanr@vancpower.com>
Subject: Re: Dateinamen + Datum letzte Aenderung
Message-Id: <35477DAA.B5077556@vancpower.com>

Arne Steinbacher wrote:

> Hallo zusammen,
> wie bekomme ich eigentlich das Datum der letzten Aederung einer
> beliebigen Datei heraus?
> Danke.
>
> Arne

No can do!  Don't understand :-(

--
Richard Tan
Virginia Power
tanr@vancpower.com




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

Date: 29 Apr 1998 19:13:22 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Defending Perl
Message-Id: <6i7u4i$gnd$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Mike Lacey
<lacey_michael_j/swby@swby.cgo.Cargill.Com>],
who wrote in article <6i71ik$hrh@wind.cargill.com>:
> Hmmm
> 
> Something tells me that Ilya works with, and has always worked with, fairly
> modern, fairly standard, kit.

No, it is Warp 3 with fixpak 17.  This is two or three years obsolete,
the current level of Warp 3 is fixpak 36, and of Warp 4 is fixpak 6.

But the fantastic backward-compatibility record of IBM helps
*enormously* with OS/2, the system may be very different, but from API
point of view they are absolutely the same.

> I'm with Abigail to an extent. On the older systems I used to have a problem
> installing perl (and other source code distributed utilities) from time to
> time but not so much recently. I've never worked with perl on anything but
> various unixes though so I'm somewhat limited myself.

Submit patches to hint files.  Nothing else will help.

Ilya



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

Date: Wed, 29 Apr 1998 17:07:23 -0600
From: Steve Traugott <stevegt@TerraLuna.org>
To: stevegt@terraluna.org
Subject: Detecting Uncaught Exceptions at Compile Time
Message-Id: <6i88aq$afc$1@nnrp1.dejanews.com>

Hi All,

Does anyone know of a way to detect uncaught exceptions at compile time,
as in Java, rather than waiting until runtime?  None of the existing
exception modules (Exception.pm, Error.pm,...) seem to be able to do
this.

For example:

####  myscript
use Exception;
use MyFile;

try  # try/catch is imported from Exception class
{
  $a = new Myfile;
  $a->open();
}
catch FileException $e
{
  print "caught a " . $e->text() . "\n";
};

BEGIN {print "done parsing myscript\n";}

package MyFile;
use FileException;  # isa Exception
use PortException;  # isa Exception

sub open
{
 throws FileException; # 'throws' could be implemented by Exception. I'd
 throws PortException; # be able to check for uncaught exceptions at
                       # runtime this way, but I'd have to remember to
                       # list them all here, and if the open() method
                       # isn't normally called, then the check might
                       # never happen until it *is* called, months later.

 open(FILE,"afile") || throw FileException;  # Exception implements throw()
 open(PORT,"/dev/tty") || throw PortException;
}

[...]

I'd want compiling this to look like:

$ perl myscript
Uncaught exception PortException at myscript line XXX
done parsing myscript

As you can see, I'm not catching PortException in the try/catch stanza
in my little example script - I'm only catching FileException.  If
$a->open() throws myscript a PortException, myscript won't know what to
do with it.  This constitutes a programming error, and I'd want this
error to be detected *at compile time*, rather than waiting until
'throw PortException' to maybe be executed someday a year from now or
relying on runtime 'throws' calls.

I think this ability to ensure at compile time that all known
exceptions will be gracefully caught at runtime is important
to writing reliable code.  Perl can't do it, as far as I can tell.

I hope someone can prove me wrong...

Steve

P.S.  The closest I've gotten with trying to implement this is with BEGIN
blocks, but that's not getting me there.  I'm suspecting it needs some
sort of compile-time macro ability in Perl - we don't have anything like
that, do we?  Or would there maybe be a way to search the call tree from
within a BEGIN block?  Any other ideas?


---
Steve Traugott
Cisco Systems Enterprise Management

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 29 Apr 1998 13:21:15 -0600
From: "Brandon" <brandon@xmission.com>
Subject: Downloading binary file with Perl script
Message-Id: <6i7uhv$lir$1@news.xmission.com>

    I am trying to use a Perl script to download a binary file (MS Access
database).  I do not want the location to be known, so I a trying to have
the script deliver the file.
    The below code seems to work for a text file, but when I try it on for a
binary file, like my database or an image, it starts the download, but only
puts a the a few kbytes in the file( which should be much larger).  With the
image, it almost looks like it is downloading the very beginning of the
file, and that's it.
    Any help would be appreciated.  Thanks!


CODE:

####
##Pass in filename
sub start_download {
    local($target_file) = @_;
    local($file_name);

    #   $target_file =~ s/^\/|^\\|\s//;
    # Make sure file exists
    if ( ! -e "$target_file")  { show_file_not_found(); }

    # get file name
    $file_name = $target_file;
    $file_name =~ s/.+\/([^\/]+)$/$1/; # for PC system
    $file_name =~ s/.+\\([^\\]+)$/$1/; # for Unix system

    # start download
    ##print "Content-Type: application/x-unkonwn\n";
    print "Content-Type: application/x-msaccess\n";
    print "Content-Disposition: filename=$file_name\n\n";

    print read_file($target_file);

1;
} # end of start_download

sub read_file {
    local($fname) = @_;
    local($content);

    open(FILE, "$fname") || return 'FILE READ ERROR';
    while(<FILE>)
    {
        $content .= $_;
    }
    close(FILE);

    return $content;
} # end of read_file




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

Date: Wed, 29 Apr 1998 20:19:11 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Brandon <brandon@xmission.com>
Subject: Re: Downloading binary file with Perl script
Message-Id: <Pine.GSO.3.96.980429131832.19984O-100000@user2.teleport.com>

On Wed, 29 Apr 1998, Brandon wrote:

>     The below code seems to work for a text file, but when I try it on
> for a binary file,

Have you seen binmode in perlfunc? Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 29 Apr 1998 14:53:26 -0400
From: Phillip Dudas <phillip@javanet.com>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: e-mail notifier that will notify by e-mail
Message-Id: <Pine.OSF.3.96.980429145016.10758D-100000@kona.javanet.com>

I am not looking for someone to write this for me. 
I made a simple mistake of posting to the same news group twice.
I was trying to post to another newsgroup.
I now know that I can not run perl scripts on my shell account.
I am not looking for a sucker.
And if you feel like you have already answered the question why would you
waste your time and respond anyway.

Phill



On Wed, 29 Apr 1998, Tom Phoenix wrote:

> On Wed, 29 Apr 1998, Phillip wrote:
> 
> > Could Anyone tell me if there is software that will monitor an e-mail 
> > address by poping it or just downloading the headers. and then every so 
> > often like every 3 hours or at specified times have the program send an 
> > e-mail message with the message something like this "You currently have # 
> > messages in your mailbox." 
> 
> The answer hasn't changed since you asked this question two days ago. If
> you won't use the answers you've already been given, why should we answer
> you again?
> 
> Are you really asking, "Won't somebody please write this software for me?" 
> People here are glad to help you to learn how to write it yourself; if
> you're trolling for a sucker who will do your work for you, that's another
> matter.
> 
> -- 
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
> 
> 



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

Date: 29 Apr 98 12:21:20 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: Grabbing a webpage with Perl
Message-Id: <01bd736a$cab30760$26c0a4c1@kitkat.aethos.co.uk>

Martien Verbruggen <mgjv@comdyn.com.au> wrote in article <6i3op0$g0l$2@comdyn.comdyn.com.au>...
> In article <353F92F1.808876D9@munu.com>,
> 	Chris <munu@munu.com> writes:
> > Does anyone know how to have a Perl program get a web page?  I just need
> > for it to grab a url I give it.  Thanks.
> 
> You really should take the trouble to read a few of the other posts
> in this group. This question comes up weekly, if not more often.
> 
Yup, and theres also a script lurking around the place, that I recall from (ages) ago, called htget.
This will get directories full of stuff, parse pages, and turn absolute links to relative ones.
It's written in Perl, but I dont remember if its perl4 or 5....I dont think it requires any more modules
than those that are in the std distribution, so it may be an idea if you dont have access or disk space to install the other
modules......

James



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

Date: Wed, 29 Apr 1998 20:16:10 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: James Richardson <jamesr@aethos.co.uk.nospam>
Subject: Helping each other (was: Credit Card Verification)
Message-Id: <Pine.GSO.3.96.980429124013.19984N-100000@user2.teleport.com>

On 29 Apr 1998, James Richardson wrote:

> Tom Phoenix <rootbeer@teleport.com> wrote in article <Pine.GSO.3.96.980428094649.15049H-100000@user2.teleport.com>...
> > Being 12 is neither a crime nor an excuse; it's merely irrelevant. On
> > Usenet, no one knows you're a dog. :-)
> 
> Bit harsh?

(Perhaps you didn't notice the smiley.) That was an allusion to a famous
cartoon from The New Yorker: Two dogs are at a computer, and the one at
the keyboard is saying, "On the Internet, no one knows you're a dog." 

The point being, of course, that we can't pre-judge you on your skin
color, your cool clothes, your species, or your age. We see only how you
behave as viewed through a stream of data. Being 12 years old is simply
not relevant here. Anyone on Usenet for any length of time will meet up
with an adolescent who will earn respect by acting in an adult fashion. 
And you'll certainly meet up with any number of adults who will lose
respect by acting in a childish fashion! :-)

> > In any case, c.l.p.misc is not a help desk. 

> So what is it then? I was under the impression that that was exactly
> what it was.... 

Ah, yours is a common misconception. Broadly, c.l.p.misc is a place to
discuss Perl and closely-related issues which aren't dealt with either in
documentation or other newsgroups. People who hang out here tend to love
Perl, and are generally glad to help people to find their own solutions to
their Perl-related difficulties. 

That's not the same as a help desk, which is typically staffed with people
who are paid to, if needed, teach a user anything and everything about how
to use a product - sometimes, even when the user's troubles are with some
other product entirely! Of course, if someone wants to purchase support,
training, or custom software development for Perl, that's available. (In
fact, that's how I make my living.) But here, we're just helping each
other, when and as we are able. We've got a role model, after all:

    I want you to know that I create nice things like this because it
    pleases the Author of my story.  If this bothers you, then your notion
    of Authorship needs some revision.  But you can use perl anyway.  :-) 
                 - Larry Wall, in the perl README file

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 29 Apr 1998 18:19:24 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
Subject: Re: How do I upload???
Message-Id: <3547A76C.719A@juicepigs.com>

Zisa wrote:
> 
> How do I upload Perl Scripts after they are made and ready?

The same way that you upload any text file.
 
HTH
-- 
Bob Trieger               |  Titanic: big boat, bigger
sowmaster@juicepigs.com   |           iceberg, big deal


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

Date: Wed, 29 Apr 1998 15:53:39 -0400 (EDT)
From: davidl@pfaffben.user.msu.edu (David Lee Lambert)
Subject: How to do sort -u within perl?
Message-Id: <m0yUcvD-000R8cC@pfaffben.user.msu.edu>

What's a simple way to do the equivalent of 'sort -u' on a list in perl?


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

Date: Wed, 29 Apr 1998 19:38:45 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: How to find the number of matches in a string
Message-Id: <1d88uxl.8dwgh71x5hfvqN@roxboro0-026.dyn.interpath.net>

In comp.lang.perl.misc Seong Y. Kim <seong@cse.bridgeport.edu> wrote:

> Here is my question, 

-snip-
 
> However, I want my program able to tell me the number of matches within
> a string.
> 
> can someone help me out?

I'm sorry, but that just can't be done very easily (at least not without
reading the manual or the faq).

-- 
John Morneo


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

Date: Wed, 29 Apr 1998 18:53:56 GMT
From: Yuri Shtil <shtil@netcom.com>
Subject: How to patch a binary file ?
Message-Id: <shtilEs6v5w.63z@netcom.com>


I've been trying to write a perl program to patch a UNIX binary file
(replace a single byte). 

I tried something like:

for ($i=0;$i<$size;$i++)
{
    read (FILE,$data,1,$i);
}

It seems that $data does not flush after each read, it accumulates bytes read:
  DB<3> p $data
0
  DB<5> c
  DB<5> p $data
<0\200>
  DB<6> c
  DB<6> p $data
<0\200 >
  DB<7> c
  DB<7> p $data
<0\200 ^@>
  DB<8> 

I've added <> for readability. The control characters displayed in an
Emacs buffer.

	Please help.

		Yuri.



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

Date: Wed, 29 Apr 1998 19:39:46 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Yuri Shtil <shtil@netcom.com>
Subject: Re: How to patch a binary file ?
Message-Id: <Pine.GSO.3.96.980429123652.19984M-100000@user2.teleport.com>

On Wed, 29 Apr 1998, Yuri Shtil wrote:

> I tried something like:
> 
> for ($i=0;$i<$size;$i++)
> {
>     read (FILE,$data,1,$i);
> }
> 
> It seems that $data does not flush after each read, it accumulates bytes
> read: 

It's all in using the function properly; see the docs for read and its
optional fourth argument. This is like saying that your pencil sharpener
doesn't work, because it keeps grinding the wrong end of the pencil! :-) 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 2458
**************************************

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