[8531] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2148 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 20 20:07:13 1998

Date: Fri, 20 Mar 98 17:00:31 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 20 Mar 1998     Volume: 8 Number: 2148

Today's topics:
    Re: A Perl version of Crypt <chasecreek.systemhouse@usa.net>
        Accepting Input from Forms mr.anime@usa.net
    Re: Accepting Input from Forms <chasecreek.systemhouse@usa.net>
    Re: Challenge your programming skill <beans@bedford.net>
    Re: Deleting and copying files in Win95 fscholz@wv.mentorg.com
    Re: display lines (Martin Vorlaender)
    Re: Document contains no data <sowmaster@juicepigs.com>
    Re: Evaluate expression inside print "" (Martin Vorlaender)
    Re: FileHandle - I really wish it had a 'file_name' met (Stuart McDow)
        how to know the version of the perl lihong@public1.guangzhou.gd.cn
    Re: Illegal octal digit error? fscholz@wv.mentorg.com
        Perl Modem Scripts dwight@allmedia.com
        Perl script to autoreply to news posts? <atstarr@newsguy.com>
    Re: Perl script to autoreply to news posts? <chasecreek.systemhouse@usa.net>
        PerlIs.dll <webgeek@agspub.com>
    Re: qw (was: Re: Newbie question: using split() while i <uri@sysarch.com>
    Re: regular expressions and control characters fscholz@wv.mentorg.com
        Squelching STDIN <jfullert@csdept.keene.edu>
    Re: Squelching STDIN <jfullert@csdept.keene.edu>
        sub-array length? <sid@mda.ca>
        Sybperl return values (Gary Udstrand)
    Re: syswrite perl win32 <thecooks@hotmail.com>
    Re: Wanted: email address gleaner <chasecreek.systemhouse@usa.net>
    Re: Wanted: Perl for Windows 3.x <jhi@alpha.hut.fi>
    Re: what is wrong with being a novice ?? (Michael J Gebis)
    Re: what is wrong with being a novice ?? (Michael J Gebis)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 20 Mar 1998 23:50:26 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: A Perl version of Crypt
Message-Id: <3512FF66.5B77AD28@usa.net>

Yes, as some others have also pointed out to me, this is an OpSys
thing, not a Perl thing per se.  I stand corrected :-)

(Now, when will the rest of the World get on Unix? )
:-/  :-\  :-|  :-)

Sneex :-)


Richard W. Koehler wrote:

> Sneex wrote in message <35106783.CA258AAF@usa.net>...
> >CRYPT is Built into Perl, no need to post it :-)
> >
> >HTH,
> >Sneex :-)
>
> Well, actually, that is not always the case.  If using the ActiveState
> pre-compiled Win32 port of Perl, yes it is.
> If using Gurusamy Sarathy's port of Perl 5.004.004, also pre-compiled, the
> crypt function was not included in the compile.
>
> But, as mentioned elsewhere, you can get Crypt.pm and Crypt:DES etc from
> CPAN.  Good luck.
>
> Rick Koehler, JAPH, or should I say JA-pilgrim-on-the-road-to-Perldom
> (JAPOTRTP)





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

Date: Fri, 20 Mar 1998 19:14:51 -0500
From: mr.anime@usa.net
Subject: Accepting Input from Forms
Message-Id: <3513067B.8A6AD106@usa.net>

I'm writing a perl script, and I'm having trouble finding out how to
read in javascript variables.  I know it can be done through forms, but
I don't know how to write the code.  Any help would be appreciated.



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

Date: Sat, 21 Mar 1998 00:29:23 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Accepting Input from Forms
Message-Id: <35130888.E1E7799A@usa.net>

I will say vaguely off-topic, but you really should goto
www.perl.com and research CGI :-)

HTH,
Sneex :-)

mr.anime@usa.net wrote:

> I'm writing a perl script, and I'm having trouble finding out how to
> read in javascript variables.  I know it can be done through forms, but
> I don't know how to write the code.  Any help would be appreciated.





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

Date: 21 Mar 98 00:52:54 GMT
From: "TomH" <beans@bedford.net>
Subject: Re: Challenge your programming skill
Message-Id: <01bd53dd$6a418ac0$8f9163ce@beans.bedford.net>


A fairly interesting problem, although it really has nothing to do with
Perl.

I'd make a first coarse filter by finding all customers within some
lat/long bounded box around the entered zipcode (plus and minus a degree or
two should do it, increase the box size if none are found). With customers
ordered by their lat/long you should be able to cut the list down to
managable size quickly. Using the Pythagorean Theorem is probably close
enough, although it would be more accurate to get cartesian vectors to the
zipcode and customer from the center of the earth and take the dot product
between them (this gives the cosine of the earth central angle); or at
least factor in the cosine of the latitude for the distance between two
longitudes (obviously they get closer together as you move away from the
equator).

You might get better answers if you can find a cartography news group.

-Tom  


Kim Lo <kiml@zplace.com> wrote in article <3510AEA6.DF610245@zplace.com>...
> Perl programmers,
> I am facing with the challenge of writing a program to find the closest
> customer name based on an input zipcode. 


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

Date: Fri, 20 Mar 1998 15:15:29 -0800
From: fscholz@wv.mentorg.com
To: qvanegeren@frxsoft.com
Subject: Re: Deleting and copying files in Win95
Message-Id: <3512F891.7B08021B@wv.mentorg.com>

I don't know the answer to your specific question, but you
should be using the 'unlink()' function instead of
'system( "del file.txt" )'.

Frank


qvanegeren@frxsoft.com wrote:
> 
> When I attempt to delete files in Win95, using the following
> command :
>           system 'del file.txt';
> I get an Invalid switch error...  It appears to remove the
> file but this makes it impossible for me to validate whether
> it executed directly, because it always returns false.  I run
> into the same problem when trying to copy a file from one
> place to another.  Again, the copy appears to work, but the
> error returned keeps me from reporting on the copy correctly.
> It's also pretty ugly for a user to see the 'Invalid Switch'
> message on the screen.  Any help would be greatly appreciated.
> 
> Quenten Van Egeren
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Fri, 20 Mar 1998 23:50:02 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: display lines
Message-Id: <3512f29a.524144494f47414741@radiogaga.harz.de>

chuck (cstewart@flash.net) wrote:
: > You need to preserve state in the stateless HTTP protocol. Have a look
: > at Randal Schwartz' WebTechniques column #2, where he discusses just that:

: This based upon search and seek with preserve, not what I needed.  Thanks..

Sure, it's not ready-made cut-and-paste; but if you leave out the
searching and the session ID thingie, all it does is output @found
in chunks of $MAXHIT lines, beginning at param('start').
Wasn't that exactly what you asked for?!

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Fri, 20 Mar 1998 19:47:26 -0500
From: Bob Trieger <sowmaster@juicepigs.com>
To: rsauve@securenet.net
Subject: Re: Document contains no data
Message-Id: <35130E1E.6563@juicepigs.com>

R. Sauvi wrote:
> 
> I'm new to perl, so please bear with a possibly 'stupid' question.
> I get the feeling that I'm missing something fundamental.
> 
> I have searched extensively (FAQs, etc), but have not seen any
> reference to my problem, although I've seen the symptom before.
> 
> I simply want my perl script to write to a file, gathering info
> from a form using the post method.
> 
> Here's the problem: everything works fine but at every 'submit' I
> get a 'Document contains no data' message. I only want perl to
> write to my file, could that be the problem? Does perl automatically
> want to return some form of data and if so, could I simply return it
> to a hidden frame? The script is basically as follows . . .
> 
> #!/../perl
> 
> $file = '/../../../file.txt';
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>     @pairs = split(/&/, $buffer);
> 
>     foreach $pair (@pairs) {
>         ($name, $value) = split(/=/, $pair);
>         $value =~ tr/+/ /;
>         $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> 
>         $FORM{$name} = $value;
>     }
> open(CHT,">>$file") || die("Unable to open file.");
> print CHT "$FORM{user} -- \n";
> print CHT "\t$FORM{says}\n\n";
> close(CHT);


The httpd server is looking for some kind of output to STDOUT.

Try throwing

	print "Content-type: text/html\n\nFooBar";

in there.


HTH
Bob Trieger
sowmaster@juicepigs.com


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

Date: Fri, 20 Mar 1998 23:34:33 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Evaluate expression inside print ""
Message-Id: <3512eef9.524144494f47414741@radiogaga.harz.de>

Gary Trachier (trachier@crrel.usace.army.mil) wrote:
: I've been scratching my head over this one, and it is time to ask for help.
:  I want to evaluate an expression inside double-quotes of a print
: statement.  How can it be done?

: Here is an example:
: {
: 	my	$var = 5;
: 	print "N plus one is ($var + 1)\n";
: }
: It should print out
: N plus one is 6

You want perlfaq4.pod, "How do I expand function calls in a string?"
(also referenced by "How can I expand variables in text strings?"):

 	print "N plus one is ${\($var + 1)}\n";

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: 20 Mar 1998 22:39:52 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: FileHandle - I really wish it had a 'file_name' method!
Message-Id: <6eur7o$2hb$1@ns1.arlut.utexas.edu>

Martin Gregory <mgregory@asc.sps.mot.com> writes:
> 
> to provide a method that returns the string that was given in the
> open (or whatever) method.  Sure, it might return me something like

Maybe. I suppose the name of the file could be stored somewhere and
accessible via a method.  But, what should be done in the case where
the file is unlinked (or renamed) before it is closed?

$fh = new FileHandle;
$fh->open("< file");
unlink("file");   # or rename("file", "file2");
# file processing stuff goes here.....
$fh->close;

>  Error: bad input while parsing '> foo.txt', stopped at line 2 of blah.pl

Ah, but at that point the file (or at least the filename) doesn't
exist. Now what?

That necessitates the need for more FileHandle methods (for unlink,
rename, etc) and forcing the programmer to use them for such
things. What if system() is used to unlink or rename the file? What if
another process unlinks the file before this one closes it? It'd be
really hard to cover all those bases.

Just some things to think about.

--
Stuart McDow                                      Applied Research Laboratories
smcdow@arlut.utexas.edu                       The University of Texas at Austin
  "It is obvious that about 750,000 people ago, Austin was a wonderful City."


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

Date: Fri, 20 Mar 1998 18:28:55 -0600
From: lihong@public1.guangzhou.gd.cn
Subject: how to know the version of the perl
Message-Id: <6ev1ju$n49$1@nnrp1.dejanews.com>

How can I know the version of perl running on my workstation?
the first line of perl scirpt should be /usr/local/bin/perl.

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


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

Date: Fri, 20 Mar 1998 14:51:20 -0800
From: fscholz@wv.mentorg.com
To: Stan Horwitz <stan@thunder.temple.edu>
Subject: Re: Illegal octal digit error?
Message-Id: <3512F2E8.7BD55AFD@wv.mentorg.com>

This is occuring because Perl thinks that you are
trying to assign octal numbers to $trans_month.
There are two ways around this; don't put in leading
'0's, or put the numbers in quotes.  Once I put the
$trans_month values in single-quotes, I had no problem
on HP-UX/Perl5.

Frank


Stan Horwitz wrote:
> 
> Could someone please tell me what an "illegal octal digit" error message
> means in Perl5 on HP Unix? I have a sequence of 12 "if" statements, all of
> which are identical in format. Those 12 statements are:
> 
>       if ($in_month eq "Jan") {  $trans_month = 01;  }
>       if ($in_month eq "Feb") {  $trans_month = 02;  }
>       if ($in_month eq "Mar") {  $trans_month = 03;  }
>       if ($in_month eq "Apr") {  $trans_month = 04;  }
>       if ($in_month eq "May") {  $trans_month = 05;  }
>       if ($in_month eq "Jun") {  $trans_month = 06;  }
>       if ($in_month eq "Jul") {  $trans_month = 07;  }
>       if ($in_month eq "Aug") {  $trans_month = 08;  }
>       if ($in_month eq "Sep") {  $trans_month = 09;  }
>       if ($in_month eq "Oct") {  $trans_month = 10;  }
>       if ($in_month eq "Nov") {  $trans_month = 11;  }
>       if ($in_month eq "Dec") {  $trans_month = 12;  }
> 
> The statements involving "Aug" and "Sep" get flagged with the following
> error messages:
> 
>   Illegal octal digit at convert.pl line 121, at end of line
>   Illegal octal digit at convert.pl line 122, at end of line
> 
> I have no idea why Perl's complaining about just those two lines. All I
> want to do is test a field to see if its equal to the abbreviation for a
> particular month of the year and set another variable called $trans_month
> to the numerical value of that month. I am stumped! If I remove those
> statements from the program, it runs fine. If anyone can shed some light
> on this strange error, please let me know.
> 
> Thanks


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

Date: Fri, 20 Mar 1998 16:59:57 -0600
From: dwight@allmedia.com
Subject: Perl Modem Scripts
Message-Id: <6eus9c$g5i$1@nnrp1.dejanews.com>

Hi,

Does anyone know of any perl scripts for sending
data to a modem?

-Dwight

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


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

Date: Fri, 20 Mar 1998 17:53:51 -0500
From: Andrew Starr <atstarr@newsguy.com>
Subject: Perl script to autoreply to news posts?
Message-Id: <atstarr-2003981753510001@enews.newsguy.com>

The first time one posts to comp.lang.perl.misc, one gets an automated
e-mail from someone indicating where to find FAQs, etc.

Anyone have info on how to obtain script like this? I'm active in the
Eudora newsgroups, and if my colleagues who are regulars in the groups
agree, I would like to implement a system there.

(If I still had the autoreply from months ago, I'd look at it. Hopefully
it's still running and this message will generate one.)

Thanks,

Andrew

-- 
Andrew Starr <http://www.amherst.edu/~atstarr>
Eudora Info: <http://www.ka.net/eudora> FAQs: <http://www.faqs.org/faqs>
Free notification of software updates: (I don't make money from this.) 
<http://www.versions.com/a_referrers/Andrew_Starr/Andrew_Starr.html>


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

Date: Sat, 21 Mar 1998 00:26:59 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Perl script to autoreply to news posts?
Message-Id: <351307F7.F163CE7F@usa.net>

Should be pretty easy to write -
would just need to read the news group feed
and keep track of the posters as they arrive, then
when someone is new you e-mail them :-)

HTH,
Sneex :-)

Andrew Starr wrote:

> The first time one posts to comp.lang.perl.misc, one gets an automated
> e-mail from someone indicating where to find FAQs, etc.
>
> Anyone have info on how to obtain script like this? I'm active in the
> Eudora newsgroups, and if my colleagues who are regulars in the groups
> agree, I would like to implement a system there.
>
> (If I still had the autoreply from months ago, I'd look at it. Hopefully
> it's still running and this message will generate one.)
>
> Thanks,
>
> Andrew
>
> --
> Andrew Starr <http://www.amherst.edu/~atstarr>
> Eudora Info: <http://www.ka.net/eudora> FAQs: <http://www.faqs.org/faqs>
> Free notification of software updates: (I don't make money from this.)
> <http://www.versions.com/a_referrers/Andrew_Starr/Andrew_Starr.html>





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

Date: Fri, 20 Mar 1998 15:50:27 -0800
From: "Roger Hosto" <webgeek@agspub.com>
Subject: PerlIs.dll
Message-Id: <6euv53$76q$1@usenet54.supernews.com>

Okay I have ran Perl in Linux. I know it very well, but now I am try to
install it on a NT machine. I have installed Perl for Win32 to runs great
but went I go to run cgi stuff with the Perlis.dll nothing happens. anyone
have any idea why?
WEBGEEK
I should stay with Linux.




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

Date: 20 Mar 1998 18:31:21 -0500
From: Uri Guttman <uri@sysarch.com>
To: Jan Krynicky <jkry3025@comenius.ms.mff.cuni.cz>
Subject: Re: qw (was: Re: Newbie question: using split() while ignoring regexps)
Message-Id: <x767l9hrcm.fsf@sysarch.com>

Jan Krynicky <jkry3025@comenius.ms.mff.cuni.cz> writes:

> Taking into account how often do you need something like this
> and how easy is it to split values on a whitespace 
> I wonder why qw works the way it does instead of taking quotes into
> account.

because qw IS a quoting mechanism, not a parser!
it doesn't call split or any perl level regex. it JUST makes a list of
tokens that were separated by white space in the SOURCE code. 

> qw(what    "ever you"  want) 
>             == 
> split ' ', 'what   "ever you"  want'
>             ==
> ( 'what', '"ever', 'you"', 'want')
> 
> I think it would be much more usefull if
> qw(what    "ever you"  want)  returned ('what','ever you','want').

useful? if you wanted ('what','ever you','want'), why not just enter it?
qw is a shortcut to save typing quote chars and commas for simple tokens.

> If we could then specify a different "input_field_separator" by some
> $whatever,
> the solution to his question would be :
> 	while (<INPUT>) {
> 		$INPUT_FIELD_SEPARATOR=',';
> 		@row = eval "qw{$_}"; # suppose that the data do not contain a closing
> brace

you just want split or some fancier parser. see CPAN::Text for others.


> And if perl would be so kind to provide us with 
>  qqw()  =  interpolate the variables in the script and then split by 
>            $INPUT_FIELD_SEPARATOR taking quotes into account.
>  we wouldn't have to do the dangerous eval(). That would be cool.

then it wouldn't be perl. use quotes if you need or qw if you don't

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----  8 Years of Perl Experience, Available Immediately
uri@sysarch.com  ---------  Resume and Perl Example at http://www.sysarch.com
Use the Best Search Engine on the Net  --------  http://www.northernlight.com


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

Date: Fri, 20 Mar 1998 15:12:04 -0800
From: fscholz@wv.mentorg.com
To: lespin03@cs.fiu.edu
Subject: Re: regular expressions and control characters
Message-Id: <3512F7C4.97915627@wv.mentorg.com>

I see two things wrong with your RE:

1 - Perl will see the '^' and assume that you intend the string
    to start with the following character.  So you must escape
    the '^'.
2 - You're escaping the escape character '\' and voiding out what
    you're trying to do.

I used the following RE:
    $a = "D";
    s/\^$a/x\$a/g

If your intention was to print out an escaped '$', then try:
    $a = "D";
    s/\^$a/x\\\$a/g


Frank


luis a espinal wrote:
> 
> Hi everyone,
> 
> I need to do the following:
> Given a text file that may contain ^U or ^D ( these are actual ascii
> chars
> '^' and 'U', 'D' not the actual ^U and ^U ), I need to replace those
> substrings by the real ^U and ^D. I did that already with
> s/^U/\xU/g;
> s/^D/\xD/g;
> 
> The problem is that I haven't been able to do the following:
> $a="D"; # or "U"
> s/^\\$a/\x\\$a/g;
> 
> and what I get is
> s/^a/\xa/g;
> 
> How can I solve this? What am I doing wrong?
> 
> Thanks.
> 
> Luis Espinal.
> 
> ------------------
> What does not kill us makes us stronger.
> Nietzche.
> 
> L^3=Long Live Linux


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

Date: Fri, 20 Mar 1998 18:22:03 -0500
From: Jamie Fullerton <jfullert@csdept.keene.edu>
Subject: Squelching STDIN
Message-Id: <3512FA1B.B22DFB9F@csdept.keene.edu>

My problem is this:

A script to further authenticate a secure login to a server will prompt
the user for a key.
I wish to "squelch" stdin so that the key entered is not verbosed to the
screen, or would
that actually be stdout in that case?  At any rate, I would like for the
script to act like the
'passwd' command on most unix systems.  I remember this being quite
simple in C. Oh well,
I favor perl over C in many situations. :-)

example:

<blah>
enter your verification number: ********
                (this is what I'm looking for-^)
<blah>

Thanks in advance for any responses!



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

Date: Fri, 20 Mar 1998 18:57:11 -0500
From: Jamie Fullerton <jfullert@csdept.keene.edu>
Subject: Re: Squelching STDIN
Message-Id: <35130257.CB7EC45@csdept.keene.edu>

Alright, I'll answer my own question.

system "stty -echo";

Silly me.  Sloppy, I suppose, due to the system call, but it works!

Jamie Fullerton wrote:

> My problem is this:
>
> A script to further authenticate a secure login to a server will prompt
> the user for a key.
> I wish to "squelch" stdin so that the key entered is not verbosed to the
> screen, or would
> that actually be stdout in that case?  At any rate, I would like for the
> script to act like the
> 'passwd' command on most unix systems.  I remember this being quite
> simple in C. Oh well,
> I favor perl over C in many situations. :-)
>
> example:
>
> <blah>
> enter your verification number: ********
>                 (this is what I'm looking for-^)
> <blah>
>
> Thanks in advance for any responses!





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

Date: Fri, 20 Mar 1998 16:27:59 -0800
From: Sidney Tupper <sid@mda.ca>
Subject: sub-array length?
Message-Id: <3513098F.41C67EA6@mda.ca>

How can you get the length of an array that's an element of another
array?

For example, the naive approach doesn't work (prints 581688):

#!/usr/local/bin/perl

@test = (["eggs","bacon","juice"],
	 ["sandwiches","cheese"],
	 ["tofu"],
	 ["apple pie"]);

$length = @test[0];		# how many elements in the first row? 

printf("%d\n",$length);


Thanks for any help offered ...
Sid


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

Date: Fri, 20 Mar 1998 23:13:58 GMT
From: gbu@uhc.com (Gary Udstrand)
Subject: Sybperl return values
Message-Id: <3514e6c2.14578725@pike.uhc.com>


	Could someone please tell me how I would determine the number of
rows updated via a sybperl call?  This is perl 4.xx.  

	Also, where can I find what subroutines are available via the
Sybperl package?

Thanks
--
                           _/    _/ _/    _/  _/_/_/  	
Gary Udstrand             _/    _/ _/    _/ _/    _/  AT&T: (612) 992-4631
Senior Systems Architect _/    _/ _/_/_/_/ _/         Fax:  (612) 992-7435
United HealthCare       _/    _/ _/    _/ _/    _/    EMail: gbu@uhc.com 
                       _/_/_/  _/    _/  _/_/_/

The world is filled with willing people; some willing to work, the rest 
willing to let them. 
							-Robert Frost


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

Date: Fri, 20 Mar 1998 15:01:16 -0800
From: "John Cook" <thecooks@hotmail.com>
Subject: Re: syswrite perl win32
Message-Id: <6eusn8$9k0@argentina.earthlink.net>

On Win32, you need to specify 'binmode' for your file handle
if your file I/O is truly binary; otherwise syswrite will
assume 'text mode' and convert <CR> to <CR LF> while writing
per the unfortunate MS-DOS/Win line termination convention.

open OUT,">test.bin";
binmode OUT;
syswrite OUT,pack("d",85.185),8;
close OUT;

--John

Bernd Engelmann wrote in message <01bd5382$ba92aaf0$0c4fb5a3@f30pc12>...
>the ouput of the Perl Win32 script:
>
>open OUT,">test.bin";
>syswrite OUT,pack("d",85.185),8;
>close OUT;
>
>on is 9 bytes in "test.bin":
>
>00000000 A470 3D0D 0AD7 4B55 40                  .p=...KU@
>
>syswrite always says '8 bytes written', but writes an additional byte for
>some numbers.
>
>Why ?
>
>Bernd
>




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

Date: Fri, 20 Mar 1998 23:45:19 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Wanted: email address gleaner
Message-Id: <3512FE33.8AD1C934@usa.net>

Allow me to end this thread now :-)

I will write the gleaner program for $10,000.
(I need a new G3 PowerMac laptop, and an Ultrasparc 5 :-)

Yes, I am serious.  Someone needs to make some money;
might as well be me :-)

There,
Sneex :-)

Jeff Potter wrote:

> Any offline project involving a newsgroup interest will cost money.

PS - No, I won't volunteer.  And yes, I can provide references.



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

Date: 21 Mar 1998 01:45:52 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Wanted: Perl for Windows 3.x
Message-Id: <oeen2elhqof.fsf@alpha.hut.fi>


It is definitely possible.

http://www.perl.com/CPAN/ports/win31/winperlp.txt

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: 20 Mar 1998 23:55:20 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: what is wrong with being a novice ??
Message-Id: <6euvl8$ed2@mozo.cc.purdue.edu>

"Jon Marshall" <xkn14@dial.pipex.com> writes:

}i have just read yet another question from a newbie/novice who fully
}expects to get flamed for simply asking about something he doesn't
}understand. this doesn't seem a very healthy attitude to engender in people
}especially considering the popularity of perl.

Here is the problem: abuse of this newsgroup has led to a situation
where old-timers are frustrated.  It must be infuriating to have
spend hundreds of hours to create a comprehensive and well-written FAQ
only to have it ignored time and time again.

If you really are a newbie and want to ask a question, I think that a
safe course of action is:
1) Pull up the FAQ.  Use the search feature of your browser to look
for relevant words.
2) Try dejanews.
3) Look it up in the camel's index.

If you've done all three, and can't find what you're looking for,
mention your search attempts and only then ask the question.  You
might still get flamed, but it probably won't sting as much. :)
Whatever you do, don't do anything that conveys "Give me the answer
for free, I'm lazy."

Good luck.

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: 20 Mar 1998 23:57:18 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: what is wrong with being a novice ??
Message-Id: <6euvou$ege@mozo.cc.purdue.edu>

"Tony Kenny" <tony@cyberscape.net> writes:

}The only problem I find with the faq is that it is so damn long, maybe there
}could be a searchable knowledge base instead.  

Edit->Search

There's probably even a hotkey for it in your favorite browser.

This will get you the answer more often than you expect.

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

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 2148
**************************************

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