HDTenEightyP/NetNews huggingface dataset:
From: " (Paul Marquess)" <pmarquess@rosebud.bfsec.bt.co.uk>
Subject: Strange behavior with -w and usersubs
Reply-To: pmarquess@bfsec.bt.co.uk
Organization: The Internet
Date: Mon, 25 Jan 1993 13:13:48 GMT

I have been playing with usersubs recently and have come across some
strage behavior when using the -w command line option to check for
errors.

Take, for example, curseperl and the pager application which comes with
the standard 4.035 distribution. If I type

    curseperl -wc pager

I get this output

Possible typo: "Def_term" at pager line 191.
Possible typo: "ERR" at pager line 191.
Possible typo: "My_term" at pager line 191.
Possible typo: "OK" at pager line 191.
Possible typo: "addch" at pager line 191.
...
... [62 lines deleted]
...

Possible typo: "wclear" at pager line 191.
Possible typo: "waddch" at pager line 191.
pager syntax OK


Perl seems to think that all of the usersubs and uservals which are not
actually used in the script are potential typos. With so many spurious 
typos being displayed it is very difficult to spot the 'real' problems.

I can understand why perl should thrown this up for a local sub, but is
this the correct behavior when dealing with usersubs? Surely it is not
a potential error to only use some of the usersub interface routines.

Does anyone agree?

Will this be fixed in Perl 5?

Have I missed something fundamental :-) ?


Paul Marquess         		Tel:    +44 232 894-265
BT                      	Fax:    +44 232 894-316
Royston House           	e-mail: pmarquess@bfsec.bt.co.uk
34 Upper Queen Street
BELFAST BT8 4QY
UK
Newsgroups: comp.lang.perl
From: dnb@meshugge.media.mit.edu (David N. Blank-Edelman)
Subject: BABYL <-> ucb/mail in perl?
Organization: M.I.T. Media Laboratory
Date: Fri, 22 Jan 1993 14:41:08 GMT

Howdy-
  Shortly, I'll need to do some wholesale conversions back and forth
between BABYL and ucb/mail formats.  Before I think about re-writing
the wheel, does anyone have Perl scripts handy to do this?  I have a
shell version or two, but I need something in Perl.  Thanks.
           Peace,
               dNb
--

 David N. Blank-Edelman              o/    \  /    \ /     /      \o   
 M.I.T. Media Laboratory            /#      ##o     #     o##      #\
 E15-473F, (617) 253-2169           / \    /  \    /o\    / |\    / \

Newsgroups: comp.lang.perl
From: jfh@netcom.com (Jack Hamilton)
Subject: Re: SOUNDEX pattern matching
Keywords: soundex, perl
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Sun, 24 Jan 1993 01:07:37 GMT

In article <1jsco2INN4dd@slab.mtholyoke.edu> jbotz@mtholyoke.edu (Jurgen Botz) writes:
>In article <1993Jan23.184532.4933@netcom.com> jfh@netcom.com (Jack Hamilton) writes:
>>Soundex is very useful.  It's used almost exclusively for English proper
>>names, I believe.
>
>Uh, that makes it pretty useless in the USA and elsewhere in the world
>except England.  

It's not designed to do all things for all people, but a lot of personal
names in the USA and England *are* English proper names as well as english
proper names (you left out English-speaking Canada, Australia, and New 
Zealand, along with a host of other places where English is a primary
language).

The algorithm would handle some non-English names correctly (spanish/
portuguese Jose, for example), but not all of them (french Louis, for
example). 

I don't know how the algorithms are written for those languages, but it
ought to be possible. 

-- 

-----------------------------------------------------------------------
Jack Hamilton   jfh@netcom.com   P. O. Box 281107   SF, CA   94128-1107
From: graham@comp.lancs.ac.uk (Graham Dean)
Newsgroups: comp.lang.perl
Subject: Metaconfig
Date: 22 Jan 93 12:59:12 GMT
Organization: Department of Computing at Lancaster University, UK.

Please excuse this posting to comp.lang.perl.

I'm looking for any references/pointers to Larry
Wall's "Metaconfig" package.

Any help would be much appreciated.

Graham Dean

-- 
********************************************************************
internet :  graham@comp.lancs.ac.uk    	   Graham Dean		   *
arpa     :  graham%lancs.comp@ucl.cs       Department of Computing *
janet    :  graham@uk.ac.lancs.comp   	   Lancaster University    *
Newsgroups: comp.lang.perl
From: daniel@nstn.ns.ca (Daniel MacKay)
Subject: Trouble Ticky System
Organization: NSTN Network Operations Centre, Nova Scotia, Canada
Date: Fri, 22 Jan 1993 20:06:17 GMT

Hello!

Has the clever little flealist program ever been beefed up into a proper
all-singing, all-dancing trouble ticket system?

Alternatively, has anyone built a trouble ticky system they'd like to share?
--
	Daniel MacKay				daniel@nstn.ns.ca
	NOC Manager, NSTN Operations Centre	902-494-NSTN
	Dalhousie University, Halifax, Nova Scotia, Canada
Newsgroups: comp.lang.perl
From: mfuhr@cwis.unomaha.edu (Michael Fuhr)
Subject: Re: Help Beginner
Organization: University of Nebraska at Omaha
Date: Tue, 26 Jan 1993 04:32:46 GMT

vince@digibd.com (Vince Mar) writes:

>If a line of text data contains vary fields, say range from 4 to 32, what is
>the easiest way to get every field.  Any way similar to UNIX set command to
>get $1..$n?  For example: a line contains "Thu Jan 21 1993  21:22:00", I 
>suppose can use splite to know number of fields, but then how to use "for" or
                 ^^^^^^
>"while" loop to get each field assign to other variables?


If I understand you, this is what you want:

	@fields = split(' ', $some_string);
	foreach $field (@fields) {
		# This loop iterates through each element in the array @fields,
		# putting the value in $field.
	}

--
Michael Fuhr
mfuhr@cwis.unomaha.edu
From: jbotz@mtholyoke.edu (Jurgen Botz)
Newsgroups: comp.lang.perl
Subject: Re: SOUNDEX pattern matching
Date: 23 Jan 1993 16:18:58 -0500
Organization: Mount Holyoke College
NNTP-Posting-Host: slab.mtholyoke.edu
Keywords: soundex, perl

In article <1993Jan23.184532.4933@netcom.com> jfh@netcom.com (Jack Hamilton) writes:
>Soundex is very useful.  It's used almost exclusively for English proper
>names, I believe.

Uh, that makes it pretty useless in the USA and elsewhere in the world
except England.  
-- 
Jurgen Botz, jbotz@mtholyoke.edu
Northampton, MA, USA
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Subject: Re: problem with on-the-fly names
Organization: NetLabs, Inc.
Date: Wed, 27 Jan 1993 17:18:51 GMT

In article <Jan.26.13.13.51.1993.13626@bakerst.rutgers.edu> steiner@bakerst.rutgers.edu (Dave Steiner) writes:
: 
: I'm using the following in a program:
: 
: eval "\$$pname{$o} = $_";
: 
: which works fine (I'm reading printcap-like entries and creating an
: assoc array for each printer with the various fields in the array).
: 
: The problem is that I don't know what fields are in the array and want
: to do something like
: 
: @o = keys eval "\%$pname";
: 
: but the syntax for keys doesn't allow this!  Is there some other way I
: can get all the entries in the assoc array?

@o = eval "keys %$pname";

By the way, you don't have to backwhack the %, since associative arrays
don't (and won't) interpolate.  (There'd be too much confusion with
printf formats if I ever made it interpolate.)

Larry
From: eric@ursula.ee.pdx.edu (FurryLogic)
Newsgroups: comp.lang.perl
Subject: How to forcefully close pipe
Date: 27 Jan 93 05:21:31 GMT
Article-I.D.: walt.1k564rINN276
NNTP-Posting-Host: ursula.ee.pdx.edu


  I want to be able to forcefully terminate a pipe opened by doing
an open( FD, "command |" ). A close() and subsequent open() on the
same desc will wait for the command to terminate. Any easy way sort
of killing the processes? Thanx.

-e.b.

--
  Eric Berggren             |  "We are Microsoft. UNIX is irrelevant.
  Computer Action Team      |    OS/2 is irrelevant. Openness is futile.
  eric@ee.pdx.edu           |    Prepare to be assimilated." by prs@turing.org
Newsgroups: comp.lang.perl,comp.sys.mac.programmer
From: neeri@iis.ethz.ch (Matthias Neeracher)
Subject: Macintosh (MPW) Perl: Release 4.0.6, New Mailing List
Followup-To: comp.lang.perl
Organization: Integrated Systems Laboratory, ETH, Zurich
Distribution: comp
Date: Mon, 25 Jan 1993 14:36:31 GMT


Version 4.0.6 of the Macintosh Programmer's Workshop port of Perl is now
available at:

nic.switch.ch        software/mac/src/mpw_c/Mac_Perl_406_{src,appl,tool}.sit
ftp.eunet.ch         software/mac/perl/Mac_Perl_406_{src,appl,tool}.sit

Mac_Perl_406_tool.sit.bin contains an MPW Tool.
Mac_Perl_406_appl.sit.bin contains a standalone application. If you don't
   have MPW (or don't even know what MPW is), you need this.
Mac_Perl_406_src.sit.bin contains the MPW C sources. If you want to recompile
   them, you also need the GUSI and gdbm packages which are in the same
   directories.

MAILING LIST

There is now a mailing list for announcing new releases, sharing scripts, and 
discussions about how to make MPW Perl change your life. To subscribe, send
a mail to <mpw-perl-request@iis.ethz.ch>

CHANGES SINCE 4.0.5

- choose() for files no longer includes the terminating null character.
- rename() and TCP sockets work better (thanks to Brad Pickering for reporting
  these bugs).
- standalone version can read scripts from its data fork and accepts more 
  startup files.
- (hopefully) improved the documentation a little. Added ObiWan support.

Matthias

-----
Matthias Neeracher                                      neeri@iis.ethz.ch
   "Emacs is a good operating system, but Unix has a nicer editor."
                                                     -- cgra@se.alcbel.be
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: How to convert string to hex?
Originator: tchrist@pixel.convex.com
Date: Tue, 26 Jan 1993 17:28:31 GMT
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 gweil@ibeam.intel.com (Garry Weil):
:>How do I convert "Test" to 0x54 0x65 0x73 0x74 ?
:Is there something better?
:BTW, I want to separate hex values with ",".

Legibility:

    while (<>) {
	chop;
	@a = unpack('C*', $_));
	for (@a) { $_ = sprintf("0x%x", $_); } 
	print join(", ", @a), "\n";
    } 

Job security:

    perl -lpe '$_=join(", ",grep($_=sprintf("0x%02x",$_),unpack("C*", $_)))'

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    "...this does not mean that some of us should not want, in a rather
    dispassionate sort of way, to put a bullet through csh's head."
		Larry Wall in <1992Aug6.221512.5963@netlabs.com>
Newsgroups: comp.lang.perl
From: inc@tc.fluke.COM (Gary Benson)
Subject: Re: Short sample program needed
Organization: John Fluke Mfg. Co., Inc., Everett, WA
Date: Thu, 21 Jan 1993 18:48:49 GMT

In article <1993Jan18.214646.2924@pacdata.uucp> jimh@pacdata.com (Jim Harkins) writes:
>I should say right off the bat that I don't know perl.  With that out of the
>way, I need a short sample perl program that will convert TeX input into
>a syllabus.  For example, given the input:
>
>\section{Online documentation}
>    \subsection{Unix rule \#1 - RTFM}
>    \begin{itemize}
>        \item Online manual (man) pages
>        \item Readme files (e.g. /usr/local/gnu-src/README)
>        \item Large manuals (e.g.
>        /usr/local/gnu-src/g960/doc/misc/gcc/gcc-user.ms, over 200 pages of
>        documentation on gcc.
>        \item Look for files ending with .ms, .man, .tex.
>    \end{itemize}
>
>		\subsubsection{Scooby doobie doo}
>			.....
>    \subsection{Man is your friend}
>
>I need the output
>
>Online documentation
>	Unix rule #1 - RTFM
>		Scooby doobie doo
>	Man is your friend
>
>All I care about are section, subsection, and subsubsections.  I can ignore
>little stuff like the backslash in front of the #.


This is very easy in perl, one of the first types of things that many people
first use perl to do: a good choice for an introductory class, in my
opinion!. My little attempt below meets your requirements for not using
trickery and for a straightforward approach to just doing the job. I have
included one "feature", though: a subroutine to do any kind of cleaning up
you might like, for example that ugly \# thing.

Here's my try:

#! /usr/local/perl -d

$debug if $d;
print "$0: A Definite Improvement over AWK!!\n" if $debug;

while (<>) {

    if (/\\section{(.*)}/) {
      &dosubs();
      print "\n$line\n";
      next;
    }
    if (/\\subsection{(.*)}/) {
      &dosubs($line);
      print "\t$line\n";
      next;
    }

    if (/\\subsubsection{(.*)}/) {
      &dosubs($line);
      print "\t\t$line\n";
      next;
    }
}

sub dosubs {

  ($line = $1) =~ s/\\#/#/;
  $line =~ s/ANYOUTRAGEOUSSTRING/s--s/;

}



>Plumbers Motto:  A flush beats a full house.

Really.

>--------------------------------------------------------------
>Jim Harkins                         [ucsd|uunet]!pacdata!jim
>Pacific Data Products               jim@pacdata.com
>--------------------------------------------------------------

ps: Jim, you will undoubtedly see 47 other approaches to this come rolling
off the net soon. May I suggest you include ALL of them in your class, and
thereby illustrate the Perl motto?

     There is more than one way to do it!





Newsgroups: comp.lang.perl
From: YIANNIS <yan@isoft.intranet.gr>
Subject: (none)
Reply-To: yan@isoft.intranet.gr
Organization: The Internet
Date: Thu, 21 Jan 1993 09:20:58 GMT

TO whom it may concern:

I understand there is a newsgroup in USENET that inform perl users on the latestnews concerning perl language and its applications. As it seems I do not have  
access to USENET, will you please inform me if there is available any public
domain Text Retrieval software already implemented and in which site it resides.

Thank you in advance

Irini Orfanoudaki     e-mail address: yan@isoft.intranet.gr
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Subject: Re: split array assignment
Organization: NetLabs, Inc.
Date: Thu, 28 Jan 1993 21:51:38 GMT

In article <1993Jan27.113301.2417@tpl68k0.tplrd.tpl.oz.au> johne@tplrd.tpl.oz.au (John Eldred) writes:
: Can some kind person tell me why this bit of code prints 4 3 ?
: 
: $_ = "a b c\n";
: $p = ($x, $y, $z) = split;
: $q = split;
: print $p, ' ', $q, "\n";
: 
: It prints 3 3 if you chop the \n from $_.

That's kinda complicated.  The split operator deletes trailing null
fields, like the null string following \n, (but only if there is no
limit specified to the split).  That's why $q ends up 3.  $p ends
up 4 for two reasons: first, the value of an assignment is the number
of values that were *available* on the right-hand side, not the number
that you ended up with on the left.  Second, the split returned 4 values
because an assignment of a split to a list automatically supplies a limit
of one more than the number of items in the list.  This is a useful
optimization, and prevents split from doing a lot of extra work in many
cases.  However, it also has the effect you noticed.

Larry
From: rogers@cirdan.wr.tek.com (Roger Southwick)
Newsgroups: comp.lang.perl
Subject: Perl version of SMTP (RFC 821) & RFC 822?
Date: 28 Jan 93 18:24:19 GMT
Organization: Tektronix, Inc.
X-Newsreader: TIN [version 1.1 PL6]


Hi gang.  I got looking at our sendmail.cf file the other day, and
realized how unnecessarily cryptic sendmail.cf files are... I mean it's
just pattern matching and replacement, right?

I thought to myself, "Self.... wouldn't this be easier to understand
and modify in Perl?" And hence the thought.  I mean I've seen/written
Perl code to be a network daemon/client (ala sendmail), and the other
rules shouldn't be that hard....

So, a couple of queries....

1) Has anyone done this?  If so, how well did it work...  can you post
the code (make it available for anon-ftp)? 

2)  If no one has done this, why not?  Am I missing something?  Is it
TOO big of a problem?  People just lazy?

I don't plan on writing it due to schedule restraints, but this
enquiring (and warped) mind needs to know....

Organization: Data Communications, Carnegie Mellon, Pittsburgh, PA
Newsgroups: comp.lang.perl
Date: Thu, 21 Jan 1993 11:57:56 -0500 
From: Tom Holodnik <tjh+@CMU.EDU>
Subject: argument hiding


Folks,
	Is there a way to invoke perl, or to use &Getopt() in a way such that
arguments are hidden by the script? 

thanks,

Tom Holodnik
Network Development
CMU
From: frankm@ying.CNA.TEK.COM (Frank 'Scruff' Miller)
Newsgroups: comp.lang.perl
Subject: julian date conversions
Date: 22 Jan 93 23:22:29 GMT
Organization: Tektronix, Inc., Redmond,  OR.

Hola Perl Guru's .... anyone wanna grab this one ...

How do I get a julian date into a regular date (like the 9
element array returned by localtime()).

If I can get this into time_t, I can do the rest (well, of course).

Thanks!

Frank
--
Frank 'Scruff' Miller      "A Perl script is correct if it is halfway readable
Tek CNA Division            and gets the job done before the boss fires you."
frankm@master.CNA.TEK.COM   -Larry Wall

Newsgroups: comp.lang.perl
From: casper@fwi.uva.nl (Casper H.S. Dik)
Subject: Re: building Perl on Solaris 2.1 (again)
Organization: FWI, University of Amsterdam
Date: Fri, 22 Jan 1993 22:57:55 GMT

eric@cray.com (Eric Markwardt) writes:

>Sheesh.. you 'catchup' a newsgroup for a few days, miss a few articles, and
>then need stuff that was recently discussed. :-(

>Anyway, can someone email me the hints/library combinations/etc. needed
>to build Perl 4.035 on Solaris 2.1 with Sun C 2.0.1?  I have access to
>gcc 2.3.3, too, if need be.

>I've managed to get it to build with Sun C, but it core dumps in fdopen() 
>when it tries to run the first test.

>Thanks a bunch in advance.

Works fine for us, with the following problems:

	- make sure that configure doesn't find/use any ucb stuff
	- compile util.c w/o optimization
	- use cppstdin or cc -E -Xs - or ...
	  the #ident at the of other cpp output confuses perl.

Casper
Newsgroups: comp.lang.perl
From: thayer@cs.columbia.edu (Charles Thayer)
Subject: Re: X and Perl
Organization: Columbia University Department of Computer Science
Date: Sat, 23 Jan 1993 02:27:10 GMT

In article <1993Jan21.074019.3648@uvaarpa.Virginia.EDU> dov@menora.weizmann.ac.il writes:

>| Have you seen WAFE?
>| Scott
>
>Yes, but it is a lot easier programming in Perl than in tcl, which is
>needed for the wafe interaction. 

wafe talks perl AND tcl.  For that matter everything can talk WAFE.
/charles


-- 
Charles Thayer, Columbia University, Dept. CS, Tech-staff... my words only.
From: hasse@dit.lth.se (Hans Lindkvist)
Subject: Re: Out of memory
Originator: hasse@dit.lth.se
Reply-To: hasse@dit.lth.se (Hans Lindkvist)
Organization: Dept of Computer Engineering, Lund University, Sweden.
Distribution: comp
Date: Thu, 28 Jan 1993 13:42:55 GMT


In article <TSHIONO.93Jan28205613@cxn21.cv.sony.co.jp>, tshiono@cv.sony.co.jp (Toru SHIONO) writes:
|> 
|> 	I'm trying to process a very huge (1,000,000 lines) file with
|> a simple Perl script.
|> The processing is done line by line and it doesn't have to keep
|> previous lines; so I presume that it will work no matter how the file
|> may be big.
|> 
|> However, Perl complains "Out of memory!"
|> 
|> To extract the problem, I tested these scripts:
|> 
|> 	#!/usr/bin/perl
|> 	foreach (1 .. 1000000) {
|> 		$line = <>;
|> 		print $line;
|> 	}
|> 
|> dies shortly, whereas
|> 
|> 	#!/usr/bin/perl
|> 	for ($i = 0; $i < 1000000; $i++) {
|> 		$line = <>;
|> 		print $line;
|> 	}
|> 
|> works fine !
|> 
|> What makes the difference ?
|> I am afraid that the former loop seems to cause memory leak or
|> something like that.
|> 
|> Any suggestions ?
|> --
|> Toru Shiono (tshiono@cv.sony.co.jp)     Sony Corporation, JAPAN

In your first example, following the "foreach" statement, there is a list
(1 .. 1000000). I guess that this list is created with all it's elements
before its processed. In this case you are not even using the elements.

-- 
Hans Lindkvist                      Tel: int'l:  +46 46 109763
Dept. of Computer Engineering       Tel: local:     046 109763
Lund University                     Fax: int'l:  +46 46 104714
P.O. Box 118                        Fax: local:     046 104714
S-221 00  Lund, Sweden              Email:  hasse@dit.lth.se
-- 
Hans Lindkvist                      Tel: int'l:  +46 46 109763
Dept. of Computer Engineering       Tel: local:     046 109763
Lund University                     Fax: int'l:  +46 46 104714
P.O. Box 118                        Fax: local:     046 104714
From: steed@ilws14.intel.com (Ze'ev Shtadler)
Newsgroups: comp.lang.perl
Subject: Re: How to do commas in sed,awk or C
Date: 24 Jan 93 21:49:55 GMT
Reply-To: steed@iil.intel.com (Ze'ev Shtadler)
Organization: Intel Corporation
NNTP-Posting-Host: ilws14.intel.com

The loop can be done using sed's `t' command:

sed -e ':l' -e 's/\(.*[0-9]\)\([0-9][0-9][0-9]\)/\1,\2/' -e 't l'
-- 
Ze'ev "Steed" Shtadler, Design Technology, IDC2-41,
INTeL Israel, P.O. Box 1659, Haifa 31015, ISRAEL.
steed@iil.intel.com	Work: +972-4-355935	FAX: +972-4-355666
iNET: 8-435-5935
From: bjk@edsr.eds.com (Brian Kodl)
Newsgroups: comp.lang.perl
Subject: Re: SOUNDEX pattern matching
Summary: perl library module
Keywords: soundex, perl
Date: 20 Jan 93 18:58:39 GMT
Organization: EDS Research, Dallas, TX 75230


Here is a perl required file containing a soundex routine that 
was originally posted towards the beginning of last year. It has 
been altered slightly up by Don Krause, a colleague, and myself.

Standard disclaimer: use at your own risk, we are not to be held
  responsible for the actions of the code, blah, blah, blah... :-)

----- cut here -------

# soundex.pl
# by George Armhold <armhold@dimacs.rutgers.edu>
# 3/22/92

# return the Soundex value of a string using the following rules:
#
#   1) remove W and H
#   2) recode characters per table:
#           A E I O U Y             0
#           B F P V                 1
#           C G J K Q S X Z         2
#           D T                     3
#           L                       4
#           M N                     5
#           R                       6
#
#   3) remove all vowels except in the first position (A E I O U Y)
#   4) if two adjacent digits are now identical, remove one
#   5) truncate to eight digits or pad out the result with zeroes to
#   make eight digits  
#   6) replace the first digit with the first character from the
#   original word 

sub soundex {
# takes a string as an argument, and returns its soundex value

    local($pattern) = @_;

    # upper-case the pattern to normalize matches
    $pattern =~ tr/a-z/A-Z/;

    # save first char
    local($first) = substr($pattern, 0, 1);

    # remove all but alphanumerics, and H,W
    $pattern =~ tr/A-GI-VX-Z0-9//cd;

    # replaces letters with numbers and squish identical numbers
    $pattern =~ tr/BFPVCGJKQSXZDTLMNR0-9/1111222222223345560-9/ds;

    # remove all vowels after 1st letter
    substr($pattern, 1, length($pattern)) =~ tr/AEIOUY//d;
   
    # replace first letter
    substr($pattern, 0, 1) = $first;

    # pad on zeroes if necessary and truncate
    substr($pattern."00000000", 0, 8); 
}

1;                              # because this is a require'd file
Newsgroups: comp.lang.perl
From: davidp@jeeves.gs.com (David Pattarini, London)
Subject: Converting PC longs to Sun longs
Reply-To: davidp@jeeves.gs.com
Organization: Goldman, Sachs and Co
Date: Tue, 26 Jan 1993 19:54:33 GMT

I need to convert long integers written by a 
PC into Sun longs. If the PC long has a layout
like:

	byte1 byte2 byte3 byte4	


I need to convert this to

	byte4 byte3 byte2 byte1

on the Sun. 

After messing around with pack and unpack I don't seem to be having too
much luck. Any help would be much appreciated.

Thanks

	David

---

+---------------------------------------------------------------+
|								|
| David Pattarini					       	|
|   Goldman Sachs International Ltd.  			        |
|   London. Tel: [071] 774 2406  Email: davidp@jeeves.gs.com	|
|								|
+---------------------------------------------------------------+
























Newsgroups: comp.lang.perl