[10642] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4234 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 16 21:07:23 1998

Date: Mon, 16 Nov 98 18:00:27 -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           Mon, 16 Nov 1998     Volume: 8 Number: 4234

Today's topics:
    Re: 'Broken Pipe' error running MacPerl_WebServer on Li <rootbeer@teleport.com>
        A PAGE WITH: HTML,JAVA,JAVASCRIPT,PERL,PHISH,AND MORE cooldude7892@yahoo.com
    Re: Automatically identifying the website user in HTML, (Mick)
    Re: Automatically identifying the website user in HTML, (Chris)
    Re: check for leading numerics and return error <r28629@email.sps.mot.com>
    Re: check for leading numerics and return error (Tad McClellan)
    Re: check for leading numerics and return error (Larry Rosler)
    Re: check for leading numerics and return error <bill@fccj.org>
    Re: check for leading numerics and return error <bill@fccj.org>
    Re: check for leading numerics and return error (Clay Irving)
        different results when running a perl program on browse <marcop@chollian.net>
    Re: fork/exit/open on SunOS/Solaris <rootbeer@teleport.com>
    Re: form with default values <rootbeer@teleport.com>
        getting the date as a string <mikej@1185design.com>
    Re: getting the date as a string (Sam Holden)
    Re: help ftp yesterdays files (Martien Verbruggen)
    Re: Holy Abounding Books, Batman! (David Formosa)
    Re: Holy Abounding Books, Batman! <tchrist@mox.perl.com>
    Re: Holy Abounding Books, Batman! (Ben Coleman)
    Re: I/O with Perl <rootbeer@teleport.com>
    Re: Keyboard/Mouse Macros? <rootbeer@teleport.com>
        need help using ipc.ph igor_urisman@hyperion.com
    Re: need help with dbmopen() <rootbeer@teleport.com>
    Re: Need to find binary data (Larry Rosler)
    Re: Need to find binary data <rootbeer@teleport.com>
        novice question re CGI.pm/cgi-lib.pl richard@stirlingbrig.com
    Re: Perl Usage Survey - interpretations, anyone? (Rich Morin)
    Re: Perl Usage Survey - interpretations, anyone? <eashton@bbnplanet.com>
    Re: Perl Usage Survey - interpretations, anyone? (I R A Aggie)
    Re: Perl_for_Win32_FAQ <rootbeer@teleport.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 17 Nov 1998 00:38:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: 'Broken Pipe' error running MacPerl_WebServer on Linux
Message-Id: <Pine.GSO.4.02A.9811161618440.27321-100000@user2.teleport.com>

On Sun, 15 Nov 1998, Nick wrote:

> I'm trying to run Clay Kasow's MacPerl_WebServer, a nifty little
> all-perl http server, on my RedHat Linux 5.2 system,

Sounds like a Mac program. Or at least a Mac-specific one. Why are you
running it on Linux?

> but it only runs for a little while before it crashes with the final
> message "Broken Pipe". I'm assuming that the IO::Socket module causes
> this. 

Perhaps, but I wouldn't make that assumption. I think that message comes
from Bash. From the Bash FAQ:

    14) Why does bash sometimes say `Broken pipe'?
 
    If a sequence of commands appear in a pipeline, and one of the
    reading commands finishes before the writer has finished, the
    writer receives a SIGPIPE signal.  Many other shells special-case
    SIGPIPE as an exit status in the pipeline and do not report it.
    For example, in:
 
          ps -aux | head
 
    `head' can finish before `ps' writes all of its output, and ps
    will try to write on a pipe without a reader.  In that case, bash
    will print `Broken pipe' to stderr when ps is killed by a
    SIGPIPE.

My guess is that your program is running some process through Bash
(probably through /bin/sh as an alias for Bash, when doing system(),
backticks, or something similar). You may wish to redirect error output.
Hope this helps!

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



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

Date: Mon, 16 Nov 1998 19:25:43 -0500
From: cooldude7892@yahoo.com
Subject: A PAGE WITH: HTML,JAVA,JAVASCRIPT,PERL,PHISH,AND MORE
Message-Id: <3650C287.83362077@yahoo.com>

COME TO MY PAGE AND SIGN MY GUESTBOOK!!!!

http://www.gettysburg.edu/~jmcmilla/



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

Date: Tue, 17 Nov 1998 01:32:16 GMT
From: moo@cow.com.hehehe (Mick)
Subject: Re: Automatically identifying the website user in HTML, Javascript, Java, or   Perl?
Message-Id: <3652d06c.3452234@news.a2000.nl>

On Mon, 16 Nov 1998 14:44:43 -0800, Bill Chapman <bchapman@best.com>
wrote:

>    I am writing a club website.
>    I want each user to have customizations kept separately, I think
>logging in every time would be far too cumbersome.  I have seen some
>sites, such as www.snap.com, that identify who you are without an
>explicit login.
>    I am trying to figure out how to find out these things while the
>user is running my web site so I don't have to ask him who he is.

You'd use a "cookie" to achieve this. See your documentation. You
cannot retrieve the email adres from the user, but you might send a
cookie and bind this cookie on a first login to the user's name.

>    Can one get the user's reply e-mail address using HTML, Javascript,
>Java, or Perl?  

I think not. For you might be suprised with *lots* of unsollicited
email, if it was.

>Anyone know of any way?  Is there other information we
>are privy to (to
>check against people changing their reply-to to prentend to be someone
>else).

No.

>    Any additional information that you could tell me how to gather
>would be most useful.

Write a login procedure. Send a cookie, bind it to the name. If the
cookie gets lost, the user has to reenter the login procedure. That's
all you can actually do.

>
>    If it's not too much trouble, please cc my e-mail.  Thanks!
>
>Bill Chapman
>


Mick


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

Date: Mon, 16 Nov 1998 18:44:58 -0600
From: trasgo@netins.net (Chris)
Subject: Re: Automatically identifying the website user in HTML, Javascript, Java, or Perl?
Message-Id: <trasgo-1611981844580001@desm-14-07.dialup.netins.net>

Bill Chapman wrote:

-    I want each user to have customizations kept separately, I think
-logging in every time would be far too cumbersome.

  To identify a visitor, you'll want to use a cookie.  You can use cookies
in CGI and JavaScript.  Set up a script with this:

  print "Set-Cookie: field_name1=$field_var1;
                     path=/;
         \n";

  This sets the field of the cookie to the established variables -- data
they've entered in through a form, or calculated stuff, in Perl.  You'll
probably want a fairly meticulous system set up so you don't have repeated
identifying variables, like "Sally" and "Sally" for two different women. 
(It's nice to have an expiration date too.)

  And to retrieve the information from a cookie, use:

  ($field, $data) = split(/=/, $ENV{'HTTP_COOKIE'});

  Well, that's a rough description.  There's more detailed explanations on
the web that should suffice.

-- 
Chris -- trasgo@netins.net

Crossposts removed, mostly.


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

Date: Mon, 16 Nov 1998 17:33:07 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: check for leading numerics and return error
Message-Id: <3650B633.ABE14E6@email.sps.mot.com>

Bill Jones wrote:
> 
> Pap wrote:
> >
> > How would i look at a string, and if it begins with a number(s), return an
> > error.
> > I dont need help with the error part, just need to be able to check it. i
> > know how to strip/change, but aren't quite sure how i can go about with this
> > numeric check.
> > It doesnt matter if there are numbers after any one letter(s).
> >
> > Thank you.
> > -Brian
> >
> > (I checked the perfaq for this, pf6 most closely, so its not there unless i
> > didnt look well enough).
> 
> Something like
> 
> $erc if ($string =~ /$[0-9]/);
                       ^
Er.., you meant this?
  $erc if ($string =~ /^\d/);

-TK


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

Date: Mon, 16 Nov 1998 18:55:00 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: check for leading numerics and return error
Message-Id: <4hhq27.dn1.ln@flash.net>

Pap (Pap22@erols.com) wrote:
: How would i look at a string, and if it begins with a number(s), return an
: error.
: I dont need help with the error part, just need to be able to check it. i
: know how to strip/change, but aren't quite sure how i can go about with this
: numeric check.
: It doesnt matter if there are numbers after any one letter(s).


   die "starts with a digit" if $number =~ /^\d/;


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 16 Nov 1998 16:07:57 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: check for leading numerics and return error
Message-Id: <MPG.10ba5e334310f72b989874@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <3650B026.8159C009@fccj.org> on Mon, 16 Nov 1998 18:07:20 -
0500, Bill Jones <bill@fccj.org> says...
> Pap wrote:
> > How would i look at a string, and if it begins with a number(s), return an
> > error.
 ...
> Something like
> 
> $erc if ($string =~ /$[0-9]/);

Well, something like that:

 $erc if ($string =~ /^[0-9]/);

Braino, no doubt.  Also, [0-9] is nicer as \d.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 16 Nov 1998 19:43:58 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: check for leading numerics and return error
Message-Id: <3650C6CD.809A0CC9@fccj.org>

Larry Rosler wrote:
> 
> [Posted to comp.lang.perl.misc and a copy mailed.]

Posted only :]  (But CC'ed was OK :)

> 
> In article <3650B026.8159C009@fccj.org> on Mon, 16 Nov 1998 18:07:20 -
> 0500, Bill Jones <bill@fccj.org> says...
> > Something like
> >
> > $erc if ($string =~ /$[0-9]/);
> 
> Well, something like that:
> 
>  $erc if ($string =~ /^[0-9]/);
> 
> Braino, no doubt.  Also, [0-9] is nicer as \d.
> 

Actually, Draino fumes, yeah - that's what it was :]


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

Date: Mon, 16 Nov 1998 19:41:15 -0500
From: Bill Jones <bill@fccj.org>
Subject: Re: check for leading numerics and return error
Message-Id: <3650C62B.DDC265E3@fccj.org>

Tk Soh wrote:
> 
> Bill Jones wrote:
> >
> > Pap wrote:
> > >
> > > How would i look at a string, and if it begins with a number(s), return an
> > > error.
> > > I dont need help with the error part, just need to be able to check it. i
> > > know how to strip/change, but aren't quite sure how i can go about with this
> > > numeric check.
> > > It doesnt matter if there are numbers after any one letter(s).
> > >
> > > Thank you.
> > > -Brian
> > >
> > > (I checked the perfaq for this, pf6 most closely, so its not there unless i
> > > didnt look well enough).
> >
> > Something like
> >
> > $erc if ($string =~ /$[0-9]/);
>                        ^
> Er.., you meant this?
>   $erc if ($string =~ /^\d/);
> 
> -TK

OK, I have dain bramage.

Thx :]


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

Date: 16 Nov 1998 20:58:47 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: check for leading numerics and return error
Message-Id: <72ql8n$ch8@panix.com>

In <3650B026.8159C009@fccj.org> Bill Jones <bill@fccj.org> writes:

>Pap wrote:
>> 
>> How would i look at a string, and if it begins with a number(s), return an
>> error.
>> I dont need help with the error part, just need to be able to check it. i
>> know how to strip/change, but aren't quite sure how i can go about with this
>> numeric check.
>> It doesnt matter if there are numbers after any one letter(s).
>> 
>> Thank you.
>> -Brian
>> 
>> (I checked the perfaq for this, pf6 most closely, so its not there unless i
>> didnt look well enough).


>Something like

>$erc if ($string =~ /$[0-9]/);

I don't think so.

   #!/usr/local/bin/perl5
   
   while ($string = <DATA>) {
       chomp $string;
       if ($string =~ /$[0-9]/) {
           print "Good: $string\n";
       } else {
           print "No good: $string\n";
       }
   }
   
   __DATA__
   01abd
   abc01
   -1245
   1234-
   *123*
   
prints:

   No good: 01abd
   No good: abc01
   No good: -1245
   No good: 1234-
   No good: *123*
   No good:

Maybe you meant something like this:

   #!/usr/local/bin/perl5
   
   while ($string = <DATA>) {
       chomp $string;
       if ($string =~ /^\d/) {
           print "Good: $string\n";
       } else {
           print "No good: $string\n";
       }
   }
   
   __DATA__
   01abd
   abc01
   -1245
   1234-
   *123*
   
It prints:

   Good: 01abd
   No good: abc01
   No good: -1245
   Good: 1234-
   No good: *123*
   No good:


-- 
Clay Irving
clay@panix.com


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

Date: Mon, 16 Nov 1998 13:47:29 GMT
From: "Sang-Chan,Lee" <marcop@chollian.net>
Subject: different results when running a perl program on browser and DOS mode.
Message-Id: <01be1168$30e46ce0$8da378d2@Magicall2.dacom.co.kr>

$)Chi,
I runned a guestbook program made with Perl according to a manual,
but I got a bad result and I couldn't understand the reason.
So, I decided to get your help after a long struggle.
This guest book program made such data as the guest's name, address, 
e-mail address, and comment into a list and then added into this list 
the 9-digit number made by time function, and saved this list as data
file with pack function and then, when requested by guests, showed the
information with html after unpacking them.
By the way, at the last part of 'comment' of guest information resulted
from guest book program, there are two strange characters or sometimes
symbols attached on the browser , and every part of guest information after
that got jumbled up.
On the way of testing, I found a litte that, when I ran the program on
browser, 
2 byte among 4 byte of strange symbols(I thought packed signed long
integer)
were not unpacked into 9 digit number and showed browser followed after
'comment' element inspite of packing and unpacking with same template 
(a30a30a30a256l). (4 byte of strange symbol could be found when I look
into data file with notepad.)
And what makes me more strange is that, when I run this program on DOS
mode, there's no strange symbol, or no jumbling, there's no problem!
I can not understand why.
I'll wait for your kind reply soon.

Thank you.

S.C.Lee



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

Date: Tue, 17 Nov 1998 01:13:12 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: fork/exit/open on SunOS/Solaris
Message-Id: <Pine.GSO.4.02A.9811161712450.27321-100000@user2.teleport.com>

On 16 Nov 1998, Shinji Kono wrote:

> So, the question is, how can I use _exit() in Perl 5? 

I think you're looking for the POSIX module. Hope this helps!

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



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

Date: Tue, 17 Nov 1998 00:49:39 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: form with default values
Message-Id: <Pine.GSO.4.02A.9811161648020.27321-100000@user2.teleport.com>

On Sun, 15 Nov 1998, Balazs Rauznitz wrote:

> Please make suggestion as which would be the most elegant way to do
> this:

I'm not sure that you define "most elegant" in the same way that I do, but
okay...

> I want to have a page where users can change their data,
> so the same form should come up, but with the values(coming from a
> database) already filled in. 

Use CGI.pm.

> The best would if there was a script, that took an html file/form as
> input and wrote out the same file except generating the form elements
> with module CGI.

Well, if you already know the best way, then why ask? :-)  But if you want
to do it that way, use an HTML parser, like HTML::Parser from CPAN.
Cheers!

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



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

Date: Mon, 16 Nov 1998 17:40:05 -0800
From: mikej <mikej@1185design.com>
Subject: getting the date as a string
Message-Id: <3650D3D5.47D457A@1185design.com>

Hey all,

I am trying to make a directory with the date as the name of the
directory. So far I have the date formatted how I want it (MM-DD-YY),
but when I go to make the directory, it wont create a directory. instead
it creates something else that is not a directory and not a file. In
Fetch it has the icons of a directory and file next to eachother,
whatever that is. I need it to make a legitimate folder. it is as though
the $date variable is not being treated as a normal string. Anyone know
the problem? Heres the source:
 
 
#gets the date
my $now = time;

($seconds, $minutes, $hours, $day_of_month, $month, $year,
    #$wday, $yday, $isdst) = localtime($now);
 
$date = sprintf("\n%02d-%02d-%02d\n",$month+1,$day_of_month,$year);
 

mkdir ($date, 0777);

 
When I replaced the above code with:

$date = "11-16-98";
mkdir ($date, 0777);

it worked, so I know the actual mkdir part is not the source of the
problem.

Any help much appreciated!
 

-mike
 
 
 
 
 
 



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

Date: 17 Nov 1998 01:45:55 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: getting the date as a string
Message-Id: <slrn751laj.a21.sholden@pgrad.cs.usyd.edu.au>

On Mon, 16 Nov 1998 17:40:05 -0800, mikej <mikej@1185design.com> wrote:
<snip>
>$date = sprintf("\n%02d-%02d-%02d\n",$month+1,$day_of_month,$year);
>mkdir ($date, 0777);

Do you really want those \n's???? 

"\n11-16-98\n" ne "11-16-98"

> 
>When I replaced the above code with:
>
>$date = "11-16-98";
>mkdir ($date, 0777);
>
>it worked, so I know the actual mkdir part is not the source of the
>problem.

But you tried it with a completely different string without those newlines...

Of course newlines in file and directory names work fine for me... maybe your
operating system or file system is broken?

-- 
Sam

Remember that the P in Perl stands for Practical.  The P in Python
doesn't seem to stand for anything.
	--Randal Schwartz in <8cemsabtef.fsf@gadget.cscaper.com>



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

Date: Tue, 17 Nov 1998 01:18:00 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: help ftp yesterdays files
Message-Id: <c9442.101$Qs1.180@nsw.nnrp.telstra.net>

In article <3650ACF3.3ED1@datamail.co.nz>,
	Arran Price <arranp@datamail.co.nz> writes:

> I simply want to ftp any files that are arrived less than 24 hours ago.
[snip]
> Any suggestions appreciated.

# perldoc perlfunc
look at the -M file test

or

# perldoc -f stat
# perldoc -f time

whatever time returns minus whatever stat returns as its 9th, tenth or
11th field (indices 8 9 10) would be the 'age' of a file in seconds.
Divide by 3600 to get hours.

It's a bit hard to say what exactly you mean by 'arrived less than 24
hours ago'. If you look at the mtime, you'll probably have the most
reliable one. It will give you the time at which the file was last
modified, i.e. when it was last written to.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Hi, Dave here, what's the root
Commercial Dynamics Pty. Ltd.       | password?
NSW, Australia                      | 


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

Date: 17 Nov 1998 00:06:49 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Holy Abounding Books, Batman!
Message-Id: <slrn751fgo.rsk.dformosa@godzilla.zeta.org.au>

In article <fl_aggie-1611981755250001@aggie.coaps.fsu.edu>, I R A Aggie wrote:
>In article <72q6ac$6lg$1@mathserv.mps.ohio-state.edu>,
>ilya@math.ohio-state.edu (Ilya Zakharevich) wrote:
[...]

>+ What do you think people buy laptops for?!
>
>Ah, but when you dump a book into the toilet, its a bit less distressing
>than when you dump your laptop... ;)

If perl dumps on your laptop it is probly a bug in perl and should be
reported via perlbug :D

-- 
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.



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

Date: 17 Nov 1998 00:35:10 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Holy Abounding Books, Batman!
Message-Id: <72qgbu$r1j$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, tice@hunch.zk3.dec.com (Walter Tice USG) writes:
:Programming Perl is as you say a must have as a reference, but the
:Pink Camel has Chapter 6 "Real Perl Programs" which the blue camel
:lacks (to it's detriment).  Both "Effective Perl Programming" and
:"Perl Cookbook" are superior IMO for 'copious examples' but assume
:a working knowledge of Perl.

To get the modern moral equivalent of the 1st edition of Programming Perl
-- that is, updated for modern perl but with the same functionality --
you actually need about 3 things: Programming Perl (2nd Edition) *and*
Perl Cookbook *and* the Perl Desktop Reference, an earlier form of which
was included in PP1 but not PP2.

The total page counts are much higher now, of course.

--tom
-- 
"Most Non-Unix managers conclude that VI is either extraterrestrial
in origin or was devised by the original Unix developers as part of a
secret communication s code to reach another dimension."
    --Communications Week - July 26, 1993.


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

Date: Tue, 17 Nov 1998 01:27:59 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: Holy Abounding Books, Batman!
Message-Id: <3650cf81.44282304@news.mindspring.com>

On 16 Nov 1998 23:57:24 GMT, ilya@math.ohio-state.edu (Ilya Zakharevich)
wrote:

>> Ah, but when you dump a book into the toilet, its a bit less distressing
>> than when you dump your laptop... ;)
>Just run it from batteries, not from AC.  Though I would think that a
>normal laptop AC/DC adapter would discouple DC part from the AC part,
>and would have some overload protection, so dropping will not result
>in getting your electrocuted even when running from AC...

Note, however, that dropping one's laptop into the toilet is likely to
change its status from 'working' to 'non-working'(as opposed to the case of
the book, where the status may change from 'working' to 'working messily').
This has been known to produce a distressed state in the user.

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: Tue, 17 Nov 1998 00:54:29 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: I/O with Perl
Message-Id: <Pine.GSO.4.02A.9811161653580.27321-100000@user2.teleport.com>

On Sun, 15 Nov 1998, Dave Crawford wrote:

> Could someone point me to some information on how (if possible) to
> 'read' the individual pins on the parallel port with Perl under Linux.

The FAQ has information about using the serial port; I believe the same
basic procedure applies. Hope this helps!

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



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

Date: Tue, 17 Nov 1998 01:58:36 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Keyboard/Mouse Macros?
Message-Id: <Pine.GSO.4.02A.9811161757440.27321-100000@user2.teleport.com>

On Mon, 16 Nov 1998 ljkbrost@my-dejanews.com wrote:

> I would like to write a progam in UNIX that would allow myself to
> playback a sequence of keystrokes or even mouse clicks, basically a
> macro.

The FAQ talks about doing things with the keyboard and mouse.

> If not, how would I go about sending keystokes to an active window.

See the docs, FAQs, and newsgroups about your windowing system. Good luck!

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



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

Date: Mon, 16 Nov 1998 21:01:53 GMT
From: igor_urisman@hyperion.com
Subject: need help using ipc.ph
Message-Id: <72q3s1$4nh$1@nnrp1.dejanews.com>

Hello,

Hopefully, this is neither trivial nor intractable.

I just downloaded 5.004_04 for solaris 2.6 and am unable to use the
system V style IPC.  ( I did run h2ph.) In the most reduced form,
my program has just one line:

require "sys/ipc.ph"

When I run it I get a syntax error (!?):

Number found where operator expected at (eval 19) line 1, near ")0"
         (Missing operator before 0?)


Thanks in advance for any help or suggestion.  Igor Urisman.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 17 Nov 1998 00:16:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: need help with dbmopen()
Message-Id: <Pine.GSO.4.02A.9811161613580.27321-100000@user2.teleport.com>

On Sun, 15 Nov 1998, Justin Park wrote:

> dbmopen(%users, '/usr/home/polar/html/usersfile', 0666) or die (print
> $!);

> i created the 'usersfile' before manually, and set it to 666.
> currently the 'usersfile' is empty
> the error message i get is no such file or directory

Did you create a file with that name ('usersfile')? Because a dbm file is
generally two files, such as 'usersfile.dir' and 'usersfile.pag'. Maybe
that's what you meant to do. Or maybe you meant to create the file(s) with
mode 666 (really, 666? That's as evil as it sounds...) by means of the
program, since you have that value instead of undef.

Hope this helps!

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



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

Date: Mon, 16 Nov 1998 16:58:11 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need to find binary data
Message-Id: <MPG.10ba6a0322b18cab989875@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <3650B2B3.EF2AD09E@email.sps.mot.com> on Mon, 16 Nov 1998 
17:18:11 -0600, Tk Soh <r28629@email.sps.mot.com> says...
> Srikanth Natarajan wrote:
> > I need to read a file and throw an error if it contains non ascii
> > data (i.e. code > 127)
 ... 
> try this:
> 
> print "non-ascii char found\n" if $char =~ /[\x80-\x8f]/;

I think you meant this:

  print "non-ascii char found\n" if $char =~ /[\x80-\xff]/;

> > Is there any special way to read one byte at a time?                                                     ^

But why do this test on a single character at a time?  It can be done 
efficiently line by line, or if the whole file is read into one scalar.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 17 Nov 1998 01:18:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Need to find binary data
Message-Id: <Pine.GSO.4.02A.9811161715190.27321-100000@user2.teleport.com>

On Mon, 16 Nov 1998, Srikanth Natarajan wrote:

> I need to read a file and throw an error if it contains non ascii
> data (i.e. code > 127)

That's easy to do in Perl.

> The bitmask check $char & 0x80 works fine if I use it with some
> arbitrary variable which contains code > 127

That's one way to do it, but relatively slow. Try using tr///, which can
scan an entire string fairly quickly, rather than processing one character
at a time.

> but when I read a file and then pass the character I read to the
> function that checks the bit mask the check fails.

That's because you're doing it wrong. (I'd tell you what if I knew, but
you didn't show what you're doing. :-)

> Is there any special way to read one byte at a time?

Yes, but it's not all that special. See the perlfunc manpage for getc(),
but I think you really want read(). Cheers!

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



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

Date: Tue, 17 Nov 1998 01:21:55 GMT
From: richard@stirlingbrig.com
Subject: novice question re CGI.pm/cgi-lib.pl
Message-Id: <3650ceaf.6986592@news.globalpac.com>

Hello folks,
Ok Im a newbie at this but but Im having a problem I can fix, and it
doesnt make sense

Im trying to create a CGIscript in Perl to handle formdata, so wanted
to use either CGI.pm, or cgi-lib.pl

Whichever one I use I get an error
with cgi-lib.pl error = Can't find string terminator "END_MULTIPART"
anywhere before EOF at cgi-lib.pl l
ine 119. 

with CGI.pm I get a similar one for line 686 message about cant find
SMTHG_SMTHNG_OvERLOAD

please - what the heck am I doing wrong !!!

Slowly going bald !
Richard


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

Date: Mon, 16 Nov 1998 15:56:20 -0800
From: rdm@cfcl.com (Rich Morin)
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <rdm-1611981556360001@140.174.42.30>

In article <3650B163.221B5889@bbnplanet.com>, Elaine -HappyFunBall- Ashton
<eashton@bbnplanet.com> wrote:

> This would be very interesting if you collected some 'computer
> demographic' information from the participants, e.g. occupation, number
> of home computers, network at home, etc. Also, to perhaps correlate the
> OS preferences and have people rank the OS' they use Perl on from the
> most to the least.

I would love to see this sort of information, but let's have a reality
check here.  This survey was done by a volunteer, going where no PH had
gone before.  So, consider it a useful starting point.  Also, it's quite
possible that many folks would not sit still for a much longer survey -
I know my patience for such things is limited...

Responders to the survey were told that their email would not be used to
send them spam.  I dunno if a follow-on email survey would be acceptable,
but it might clear up some of these questions, as well as teasing apart
the Windows entries a bit more (95 != 98 ne NT).

> Well, Solaris is now free for non-commercial use as well. And Solaris?
> We have over 4000 machines cumulatively and 98% of them are running
> Solaris. Sun has a pretty good hold on the market which seems to be
> growing even when NT is supposedly eating the Unix market share. Linux
> is just great to have around as an alternative to Windoze for the PC.

I don't think folks are using Linux (or Solaris) as a way to avoid using
Windows.  If they need to run Windows, they do.  Rather, Linus is used
by folks who want to use Linux, when they arte able to do so.

Solaris is an interesting case; I see HP, IBM, and SCO talking about
their "standard" new version of UNIX.  Meanwhile, Sun is eating their
lunch and Linux is marching (flying?) toward Linus's goal of "World
Domination".  Weirrrd!

-r

-- 
Canta Forda Computer Laboratory       | Prime Time Freeware - quality 
UNIX consulting, training, & writing  | freeware at affordable prices
+1 650-873-7841                       | +1 408-433-9662   -0727 (Fax)
Rich Morin, rdm@cfcl.com              | www.ptf.com, info@ptf.com


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

Date: Tue, 17 Nov 1998 00:31:27 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <3650C13C.59A8703F@bbnplanet.com>

Rich Morin wrote:

> I would love to see this sort of information, but let's have a reality
> check here.  This survey was done by a volunteer, going where no PH had
> gone before.  So, consider it a useful starting point.  Also, it's quite
> possible that many folks would not sit still for a much longer survey -
> I know my patience for such things is limited...

I understand, but it could be up to the user to answer a few questions
on the survey and it could be kept to a simple minimum. As far as
weighting the OS' and rendering the data in a useful format, that would
take more time, but since a conference paper was mentioned.... Many
people sat through the original survey and I would bet they would sit
through some of the more interesting questions just to see the results. 

> Responders to the survey were told that their email would not be used to
> send them spam.  I dunno if a follow-on email survey would be acceptable,
> but it might clear up some of these questions, as well as teasing apart
> the Windows entries a bit more (95 != 98 ne NT).

An email survey would be interesting but without a form and the
immediateness of a web page, I doubt that the response would be as great
and it would be much harder to keep the data simple. more work.

> I don't think folks are using Linux (or Solaris) as a way to avoid using
> Windows.  If they need to run Windows, they do.  Rather, Linus is used
> by folks who want to use Linux, when they arte able to do so.

What else would I run on the PC if I didn't have a freeware Unix?
Windows. I use Linux and x86 to avoid using windows. 

e.

<njt> "Is that a socket() ready to accept(), or are you just glad to see
me?"


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

Date: Mon, 16 Nov 1998 20:42:48 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <fl_aggie-1611982042480001@aggie.coaps.fsu.edu>

In article <3650B163.221B5889@bbnplanet.com>, Elaine -HappyFunBall- Ashton
<eashton@bbnplanet.com> wrote:

+ growing even when NT is supposedly eating the Unix market share. Linux

I haven't seen anyone predicting the death of unix in a while...

James


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

Date: Tue, 17 Nov 1998 01:06:31 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl_for_Win32_FAQ
Message-Id: <Pine.GSO.4.02A.9811161706100.27321-100000@user2.teleport.com>

On Sun, 15 Nov 1998, George C. Hetrick wrote:

> Can anyone tell me where Perl_for_Win32_FAQ.html has gone to?
> The link on www.perl.org is a dead link, 

    http://www.perl.com/CPAN-local/doc/FAQs/nt/perlwin32faq.html

Hope this helps!

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



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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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