HDTenEightyP/NetNews huggingface dataset:
From: cracraft@rice-chex.ai.mit.edu (Stuart Cracraft)
Newsgroups: comp.lang.perl
Subject: oddity in syslog.pl
Date: 27 Aug 92 23:47:34 GMT
Organization: MIT Artificial Intelligence Lab


One Perl application I'm using has

	require 'syslog.pl';

at its beginning. I get an error when running this application:

Undefined subroutine "syslog'LOG_DEBUG" called at /usr/local/lib/perl/syslog.pl line 65.

Seemingly, this line (line #65) has:

	require 'syslog.ph'  <=== NOTE PH SUFFIX

I looked in the Perl distribution we received (4.019) and
couldn't find any file 'syslog.ph'.

Any idea what this file is?

Stuart
From: michi@ptcburp.ptcbu.oz.au (Michael Henning)
Newsgroups: comp.lang.perl
Subject: Re: Camel Book for 5.xxx hardback?
Date: 31 Aug 92 23:47:59 GMT
Organization: Pyramid Technology Corporation

djm@eng.umd.edu (David J. MacKenzie) writes:

>The Perl book seems to stretch the O'Reilly binding process to its
>limits.  I think it might just be too thick for that binding
>technique.  I've seen several Perl books whose bindings seemed to give
>out after only a year or so, so that the books end up with lots of
>pages falling out.  They're heavily used as references; I think the
>book really needs a better binding, hardcover or otherwise.

I'll second that. My copy started losing pages withing two days of opening
it. Maybe O'Reilly need to work on their QA a bit?

								Michi.
-- 
      -m------- Michael Henning                 +61 75 950255
    ---mmm----- Pyramid Technology              +61 75 722475 FAX
  -----mmmmm--- Research Park, Bond University  michi@ptcburp.ptcbu.oz.au
-------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA   uunet!munnari!ptcburp.oz!michi
Newsgroups: comp.lang.perl
From: john@sekrit.WPI.EDU (John Stoffel)
Subject: Re: Fast String Operations?
Organization: Worcester Polytechnic Institute
Date: Thu, 27 Aug 1992 14:46:03 GMT

>>>>> On Tue, 25 Aug 1992 21:59:59 GMT, mab@wdl39.wdl.loral.com (Mark A Biggar) said:
>#!/usr/local/bin/perl
>
>$string = "a|bcd||g||i|||";
>@name = (1,2,1,1,2,1,2,1);
>
>$count = 0;  # index into @name

Mark> @string = split(/|/,$string);

This split won't work correctly because it will ignore the null fields
at the end of $string.  I played with this for a while, RTFM a few
times and changed it to

Mark> @string = split(/|/,$string,100);

with the 100 forcing it to match even null fields.  I was assuming
that there were fewer than 100 records in a line.

Mark> foreach $s (@string) {
Mark> 	$s = ($name[$count++] == 1 ? -1 : '~') if $s eq '';
Mark> }
Mark> $string = join('|', @string);
--
Youth of today!  Join me in a mass rally for traditional mental attitudes!
-------------------------------------------------------------------------------
john@wpi.wpi.edu | Work Station Specialist | Worcester Polytechnic Institute
John Stoffel     | 508-831-5512 (work)     | Worcester, MA  01609
Newsgroups: comp.lang.perl
From: greyham@research.canon.oz.au (Graham Stoney)
Subject: Re: How do I make traps in perl?
Organization: Canon Information Systems Research Australia
Date: Tue, 1 Sep 1992 03:43:32 GMT

lwall@netlabs.com (Larry Wall) writes:

>    $SIG{"INT"} = "CATCHINT";
>    ...

>    sub CATCHINT {
>	print "OUCH! Don't DO that!!!\n";
>    }

>Nowadays I often just write

>    $SIG{INT} = CATCHINT;

On a related topic, how do you prevent such a signal handler from generating a
"Possible typo" warning when run with -w?.

Graham
-- 
Graham Stoney. Ph: +61-2-805-2909.         Totally unrelated message follows:
Since 1900, there are 23 known cases of innocent people being put to death in
the USA; but since the execution ends any effort to investigate possible
misscarriages of justice, the real figure is certainly much higher.
From: john@sekrit.WPI.EDU (John Stoffel)
Newsgroups: comp.lang.perl
Subject: Re: easy question?: substrings
Date: 28 Aug 92 18:16:03 GMT
	<1992Aug26.222821.28341@news.eng.convex.com>
Distribution: usa
Organization: Worcester Polytechnic Institute

>>>>> On 26 Aug 92 22:28:21 GMT, tchrist@convex.COM (Tom Christiansen) said:
Tom> Originator: tchrist@pixel.convex.com
Tom> Nntp-Posting-Host: pixel.convex.com

Tom> From the keyboard of budnick@cbnewse.cb.att.com (Mary Jo Budnick):
Tom> :Hi!  I just started to use Perl and can't find the info in the
Tom> :Wall/Schwartz book very easily to solve my problem.  Help me out?
Tom> :
Tom> :All I want to do is to change a string in the format of either
Tom> :	0xffffff00 or ffffff00 into the format
Tom> :	of 255.255.255.0 

Tom> Try:

Tom>     $n = "ffffff00";
Tom>     print join(".", unpack(C4, pack(L, hex($n)))), "\n";
					 ^	
                                         |

Don't you mean you want a 'N' instead of the 'L' in the pack?

At least this is what is needed with perl 4.035 on a DECstation 3100.

--
Youth of today!  Join me in a mass rally for traditional mental attitudes!
-------------------------------------------------------------------------------
john@wpi.wpi.edu | Work Station Specialist | Worcester Polytechnic Institute
John Stoffel     | 508-831-5512 (work)     | Worcester, MA  01609
Newsgroups: comp.lang.perl
From: Harald.Eikrem@delab.sintef.no
Subject: (n'th zillionth time): reasonably working perl 4.xx port under VMS?
Organization: SINTEF DELAB, Trondheim, Norway.
Date: 3 Sep 92 23:15:22


I do believe this has been asked many a time before, and yet still.......
Let me point out that this is not a personal need of mine, but for
thousands of others which do not know themselves..... :).

Nah, actually I would be exaltedly happy if I can offer perl and quite a
few existing script files as an added value to a VMS work I'm contri-
buting to.

Please tell me the how story goes here, be it positive or negative.

  ~~h
Newsgroups: comp.lang.perl
From: BENGLIM%ITIVAX.bitnet@cunyvm.cuny.edu
Subject: RE: Perl-Users Digest #529
Reply-To: BENGLIM%ITIVAX.bitnet@cunyvm.cuny.edu
Organization: The Internet
Date: Wed, 2 Sep 1992 21:59:47 GMT

Please delete me from the subscription.  Thanks.
Newsgroups: comp.lang.perl
From: asherman@laser.fmrco.com (Aaron Sherman)
Subject: Re: help!
Reply-To: asherman@fmrco.COM
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
Date: Wed, 2 Sep 1992 16:23:19 GMT


What you want is:

$a = "hello";
@a = (one, two, threeeee);
%a = (a, apple, b, banana, c, cherry);

then things like:

print $a, $a{'a'}, $a[0], "\n";

Will work.

${$a} is not valid in perl (or at least, it does something that you
are not expecting). 


			-AJS

--
--------
Disclaimer: I am solely responsible for the content of this message.
The views expressed here may not be the views of I-Kinetics, Fidelity,
any of the Fidelity-owned corporations or my mother.
From: rm55+@pitt.edu (Rudolph T Maceyko)
Newsgroups: comp.lang.perl
Subject: Re: Looking for MS-DOS port of perl?
Date: 27 Aug 92 01:25:41 GMT
Organization: University of Pittsburgh

In article <1992Aug26.181425.543@ccu.umanitoba.ca> rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:
>albert@INSL.McGill.CA (Albert Pang) writes:
>...
>>Is anyone who has perl executable and are willing to share it with the
>>rest of the world.  It will be much appreciated.
>
>Try anonymous fto to ftp.ee.umanitoba.ca:/pub/msdos/perl

NOTE: perl386.zoo (which is perl-4.035) still has some problems, like

	while (<>)

not working (when it worked just fine with perl_exe.zoo (perl-4.019), and
not being able to set $~ to anything other than the name of a file handle
and still get output...

Rudy
-- 
Rudy Maceyko
<rm55+@pitt.edu> or <rtm+@cmu.edu>
Pittsburgh, Pennsylvania USA
Newsgroups: comp.lang.perl
From: hrose@eff.org (Helen Trillian Rose)
Subject: Re: Camel Book for 5.xxx hardback?
Organization: The Evil Fascist IRC Admins From Hell, Inc.
Date: Mon, 31 Aug 1992 20:23:46 GMT

Mike> == Mike Stok <mike@meiko.com> 

 Mike> If there's going to be a new Camel Book for the new Perl, will it
 Mike> ever be available as a hardback?  Of all the books on my shelf
 Mike> the Camel Book is the most heavily used (with the possible
 Mike> exception of Peopleware which is rarely on the shelf :-) and
 Mike> although it's only 18 months old it's showing quite a few signs
 Mike> of wear and tear.  How many people out there would be interested
 Mike> in shelling out extra money for a more durable book?

One thing I do to keep my "heavily-used" books from falling apart is
cover them in clear-contact paper (it's the ex-Catholic schoolgirl in
me! ;-). You can get it, in rolls, at most stores. If you're really
afraid, you can strengthen the covers with stiff cardboard
(contact-paper'ing it in, of course :-) which gives it an
almost-hardback feel. 

All three of my camels (yeah, *three* -- two of edition 1 and one of
edition 3) are covered. I don't feel so badly tossing them to my fiance
accross EFF's tech area this way.....

--Helen
--
Helen Trillian Rose             	email eff@eff.org for EFF info
Electronic Frontier Foundation   	irc operators: operlist@eff.org
Systems and Networks Administration	Flames to: 
<hrose@eff.org, hrose@cs.bu.edu>	women-not-to-be-messed-with@eff.org
Newsgroups: comp.lang.perl
From: jv@mh.nl (Johan Vromans)
Subject: Perl Reference Guide 4.035.1 has been posted to comp.sources.misc
X-Md4-Signature: d6ee18e2a676b8c876371cfe24292f02
Organization: Multihouse Automation, the Netherlands
Date: Wed, 2 Sep 1992 14:41:19 GMT

Finally here it is: the new and updated version of the 

	Perl Reference Guide

has been sent to the moderator of comp.sources.misc and will appear in
this newsgroup soon.

This version has been updated to match Perl 4.035.

As usual, two kits are posted: a ready-to-print PostScript version and
a LaTeX source kit.

From the README:

The Perl Reference Guide is a typeset quick reference guide to
Larry Wall's Perl program.

It contains a concise description of all Perl 4.0 statements,
functions, variables and lots of other useful information. 
The Guide is based on Perl version 4.0, patchlevel 35.

The purpose of the Reference Guide is to aid in the use of Perl, to
look up the syntax of specific functions, statements and the meaning
of built-in variables.  It is *NOT* a self-contained user guide -
basic knowledge of the Perl language is required. It is *NOT* complete
- some of the more obscure variants of perl constructs have been left
out.  But all functions and variables are mentioned in at least one
way they can be used.

Happy hacking!

	Johan
-- 
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp:..!{uunet,sun4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: How do I make traps in perl?
Date: 28 Aug 92 19:01:01 GMT
Organization: NetLabs, Inc.

In article <1992Aug26.135146.1759@linda.lidac.liu.se> thenglid@linda.lidac.liu.se (Thomas Engstrom) writes:
: Is there anyone that knows how to catch signals in perl? Something like
: "trap" in bourne shell.

    $SIG{"INT"} = "CATCHINT";
    ...

    sub CATCHINT {
	print "OUCH! Don't DO that!!!\n";
    }

Nowadays I often just write

    $SIG{INT} = CATCHINT;

Larry
Newsgroups: comp.lang.perl
From: dsb@world.std.com (David Boyce)
Subject: Re: easy question?: substrings
Organization: The World Public Access UNIX, Brookline, MA
Distribution: usa
Date: Wed, 26 Aug 1992 23:22:31 GMT

In article <1992Aug26.222821.28341@news.eng.convex.com> tchrist@convex.COM (Tom Christiansen) writes:
>From the keyboard of budnick@cbnewse.cb.att.com (Mary Jo Budnick):
>:Hi!  I just started to use Perl and can't find the info in the
>:Wall/Schwartz book very easily to solve my problem.  Help me out?
>:
>:All I want to do is to change a string in the format of either
>:	0xffffff00 or ffffff00 into the format
>:	of 255.255.255.0 
>
>Try:
>
>    $n = "ffffff00";
>    print join(".", unpack(C4, pack(L, hex($n)))), "\n";
>
>Add quotes around the format strings for old versions of perl.

    Or what I find less obfuscated:

$n = "0xffffff00";
($junk, $f1, $f2, $f3, $f4) = $n=~/(0x|)(..)(..)(..)(..)/;
printf "%d.%d.%d.%d\n", hex($f1), hex($f2), hex($f3), hex($f4);

-- 
David Boyce	dsb@world.std.com	617-576-1540
From: ej@id.dth.dk (Erik Johansen)
Newsgroups: comp.lang.perl
Subject: Re: Fast String Operations?
Date: 26 Aug 92 08:03:04 GMT
Organization: Department of Computer Science

rlg@IDA.ORG (Randy garrett) writes:

>I'm looking for the fastest way to perform the following operation.
>Basically, this is a conversion of one database format to another.
>If I have a NULL field, indicated by 2 pipe symbols next to
>each other, I want to insert either a -1 or a ~ between the 
>two pipes, depending upon whether the type of that field
>is a integer or a character.  I know the type of the field
>because I've already pre-filled that array with the correct
>types from the Data Dictionary (Thanks Sybase to Perl Interface!).

>So, I read in a series of lines from a file.  If I find 2 pipe 
>symbols adjacent to each other, "||", in the input string, I want
>to insert either a ~  or a -1 depending on the type of that field,
>which I get from the @name array.

Here is my rewriting of your code:

#!/usr/local/bin/perl
# Walk thru a string; if find "||" insert either a ~ or a -1
# depending on value of @name

$string = "a|bcd||g||i|||";
@name = (1,2,1,1,2,1,2,1);

%defaults = (1, '-1', 2, "~");  # Specify defaults for each of your types
@strings = split(/\|/, $string);
for $count ( 0..8 )
 {
  $strings[$count] = $defaults{ $name[$count] } if $strings[$count] eq '';
 }
$string = join("|", @strings);

print "$string\n";
 

- Erik


-- 
---
Erik Johansen                  E-mail: ej@id.dth.dk
Institute for Computer Science, Copenhagen, Denmark
Newsgroups: comp.lang.perl
From: nlane@well.sf.ca.us (Nathan D. Lane)
Subject: Why is this foreach loop exiting early?
Organization: Whole Earth 'Lectronic Link
Date: Wed, 26 Aug 1992 23:25:13 GMT

Hello all,
	I was really hoping I could write this one "all by myself" but I seem to
be stuck.  If I had a few more days (I've already spent four or five days on
this) I might stumble on the answer, but...  Anyway, first things first:

seldon{diana}1243$ perl -v
This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
Patch level: 19

I am trying to write a program that will go through a file approximately 20K
in size, find a line beginning with 'MAIL:' in the middle of each of 25 or
so records, do all sorts of nonsense to find out what county the mailing
address is in, create a file named for the county, write the record to the
file, then go on to the next record.  The "nonsense" (the process to find
the county) works fine.  The first record winds up in a file named for the 
correct county. The problem is that the program quietly exits after closing
the file it has just written to.  Maybe some code will help - I'll keep it
as short as possible to conserve bandwidth and your patience.

#!/usr/bin/perl

($file) = @ARGV;
chop(@farms = `cat $file`);
print "farms read in...\n";   	# data file
chop(@zips = `cat /u/src/data/zip/zipcode.txt`);
print "zips read in...\n";   	# file contains zip:city, state
chop(@counties = `cat /home/diana/prg/Trico/cs/cities.txt`);
print "counties read in...\n";	# file contains city:county

$i = 0;
$j = 1;
foreach $farm (@farms) {
        next unless ($farm =~ /SEQ/);	# I have also tried without the next
        if ($farm =~ /SEQ/) {
                ($junk, $seq) = split(':', $farm);
                ($seq, $junk) = split('\-', $seq);
                until ($farms[$j] =~ /SEQ|SEARCH COMPLETE/ ) {
                        $Farm{$seq} = join("\n", $Farm{$seq}, $farms[$i]);
                        if ($farms[$i] =~ /MAIL/) {
                                &get_cty;
                        }
                        $i++;
                        $j++;
                }
                open(COUNTY, ">>counties/$abbrev") || die "Can't create
$abbrev: $!\n";
                print COUNTY "$Farm{$seq}\n";
                close COUNTY;
        }

		# This part doesn't work yet; when it does it will
		# take the sequence number ($Seq) and put the current
		# line ($farm) into the file containing the corresponding
		# record ($Farm{$seq} above).  Any tips welcome.

        if ($farm =~ /INDEX/) {		# comes after the 'SEARCH COMPLETE' line
                next until /\d+/;
                ($Seq, $rest) = split(' ', $farm);
        }
}

The program doesn't reach the second record, or at least doesn't process it.
Needless to say, it doesn't find the INDEX line either (which is why I
haven't gotten that part of the processing to function).  Any help would be
appreciated, including suggestions on style.  I do want to learn!

- Diana B. Lane
nlane@well.sf.ca.us
Trico Title Co., Santa Barbara, CA
From: sherman@unx.sas.com (Chris Sherman)
Newsgroups: comp.lang.perl
Subject: Re: Camel Book for 5.xxx hardback?
Date: 31 Aug 92 18:49:26 GMT
Organization: SAS Institute Inc.

In <1992Aug29.162151.1847@meiko.com> mike@meiko.com (Mike Stok) writes:

>If there's going to be a new Camel Book for the new Perl, will it ever
>be available as a hardback?  Of all the books on my shelf the Camel
>Book is the most heavily used (with the possible exception of
>Peopleware which is rarely on the shelf :-) and although it's only 18
>months old it's showing quite a few signs of wear and tear.  How many
>people out there would be interested in shelling out extra money for a
>more durable book?

Actually, the Perl book on CD-ROM would be really handy!!!  I would be willing
to pay bucks for all the 'animal' O'Reilly books on a CD-ROM.

Also, is there going to be a patchlevel 35 version of the 'Perl Reference 
Guide' out soon?  (Talk about something I keep wearing out...)
-- 
     ____/     /     /     __  /    _  _/    ____/
    /         /     /     /   /      /     /          Chris Sherman
   /         ___   /        _/      /          /
 _____/   __/   __/   __/ _\    _____/   _____/           sherman@unx.sas.com
From: jim@spitws117.sbil.co.uk (James Gillespie)
Newsgroups: comp.lang.perl
Subject: Bad label: _EVAL_
Date: 3 Sep 92 08:26:20 GMT
Reply-To: jim@spitws117.sbil.co.uk
Organization: Salomon Brothers International Limited

The subject just about says it all.  I have written a perl script which
appears to run okay until it dies with the following message:

	"Bad label: _EVAL_ at <filename> line 367"

line 367 is:

    open (OUTPUT, "> $oldfile") || die "Couldn't open '$oldfile' for writing\n";

For all the difference it makes, $oldfile is defined and has a sensible value.
I am using perl version 3.0.1.9, patch level 41.

This error has me completely stumped.  Any help will be greatly appreciated.
Thanks,

Jim Gillespie ----------------------------------------------------
jim@sbil.co.uk              Salomon Brothers International Limited
+44 71 721 2672             ---------------------------------------------------
           "Three strikes and you're history, kiddo!" - Calvin's mom
Newsgroups: comp.lang.perl
From: fenner@postscript.cs.psu.edu (Bill Fenner)
Subject: Re: fast way to get number of elements in an assoc array?
Organization: Penn State Computer Science
Date: Sun, 30 Aug 1992 01:44:18 GMT

In article <MEISSNER.92Aug27103724@tiktok.osf.org> meissner@osf.org (Michael Meissner) writes:
|In article <1992Aug27.032106.20515@CS.ORST.EDU> jacobsd@prism.cs.orst.edu (Dana Jacobsen) writes:
||   Is there a function akin to $#array that works on associative arrays?
|
|	int (scalar (%array))

Er...

for (1..20) {
	$foo{"$_"}="Zow!";
}
print int(scalar(%foo));

gave me 16.  scalar(%foo) = "16/32".  You could do
scalar (keys %foo);
which gave me 20.

  Bill
-- 
Bill Fenner	fenner@cs.psu.edu	..psuvax1!hogbbs!wcfpc!wcf
		wcf@hogbbs.scol.pa.us   (+1 814 238-9633 v.32bis)
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: coding style (was Re: Perl language formatting conventions?)
Date: 28 Aug 92 18:18:21 GMT
Organization: NetLabs, Inc.

In article <FAIGIN.92Aug27141558@soldan.aero.org> faigin@aero.org (Daniel P. Faigin) writes:
: On 27 Aug 92 18:00:29 GMT, lwall@netlabs.com (Larry Wall) said:
: 
: > You want religion, I got religion...
: 
: And you should never argue religion with the son of a preacher. :-)

Yes you should.  :-)

Larry
Newsgroups: comp.lang.perl
From: jv@mh.nl (Johan Vromans)
Subject: Re: Camel Book for 5.xxx hardback?
X-Md4-Signature: 50f4bc34b1e36f440d6bb27688eb8e4e
Organization: Multihouse Automation, the Netherlands
Date: Tue, 1 Sep 1992 09:59:28 GMT

In article <sherman.715286966@foster> sherman@unx.sas.com (Chris Sherman) writes:

> Also, is there going to be a patchlevel 35 version of the 'Perl Reference 
> Guide' out soon?  (Talk about something I keep wearing out...)

Although the differences are minor, I intent to release a 4.035
version of the reference guide within a few weeks. Stay tuned.
BTW: my reference guide never wears out. I usually give it away long
before that.

	Johan
-- 
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp:..!{uunet,sun4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------
From: jacobsd@prism.cs.orst.edu (Dana Jacobsen)
Newsgroups: comp.lang.perl
Subject: fast way to get number of elements in an assoc array?
Summary: is there a way to count elements in an assoc array better than keys?
Keywords: associative array number count $#array $#
Date: 27 Aug 92 03:21:06 GMT
Article-I.D.: CS.1992Aug27.032106.20515
Organization: Oregon State University, Computer Science Dept


  Is there a function akin to $#array that works on associative arrays? I
have an associative array with over 30,000 keys, and this is what I'm 
currently doing:

    @dummykey = keys(%records);
    print $#dummykey+1, " records loaded.\n";
    undef (@dummykey);

  The problem with this is that the key list takes up a significant chunk of
memory, as well as being very slow.  The alternative way of handling this is
to keep a seperate variable that contains the number of elements in the 
array, something like:

  $records{$name} || $numberofrecords++;
  $records{$name} .= $; . $citekey;

However, this seems unaesthetic, as well as raising the possibility (if records
got added elsewhere in the code also) of having an incorrect count.

  Any ideas?
--
Dana Jacobsen                "After learning Perl, I can't wait for Swine!"
jacobsd@cs.orst.edu
jacobsd@solar.cor2.epa.gov              Power, Corruption, & Lies -- Bush '92
Dana Jacobsen                       Oregon State University
jacobsd@cs.orst.edu                   Computer Science
.!hplabs!hp-pcd!orstcs!jacobsd
Dana_Jacobsen@RPITSMTS.BITNET           Power, Corruption, & Lies -- Bush '92
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: easy question?: substrings
Originator: tchrist@pixel.convex.com
Date: Wed, 26 Aug 1992 22:40:28 GMT
Distribution: usa
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of tchrist@convex.COM (Tom Christiansen):
::All I want to do is to change a string in the format of either
::	0xffffff00 or ffffff00 into the format
::	of 255.255.255.0 

:    $n = "ffffff00";
:    print join(".", unpack(C4, pack(L, hex($n)))), "\n";
:
:Add quotes around the format strings for old versions of perl.

Blech.  Doesn't work on a DECstation.  Byte order foo.  Use this instead:

    print join(".", unpack("C4", pack("N", hex($n)))), "\n";

--tom

-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    There is, however, a strange, musty smell in the air that reminds me of
    something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
        --Larry Wall in Configure from the perl distribution