[10422] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4014 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 20 00:03:37 1998

Date: Mon, 19 Oct 98 21:00:41 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 19 Oct 1998     Volume: 8 Number: 4014

Today's topics:
        Build DBD-Oracle-0.54 on Windows NT yzhao@my-dejanews.com
        Build pRPC-modules-0.1005 on Windows NT yzhao@my-dejanews.com
        CGI problem...probably a simple answer. piercew@netscape.net
    Re: CGI problem...probably a simple answer. (Kevin Falcone)
        change user password lincr@usa.net
    Re: change user password (Martien Verbruggen)
    Re: Cool company has Perl jobs! (Adam Turoff)
    Re: count files.... <dgris@rand.dimensional.com>
        Heinous - Nothing! <jtjohnston@erase.courrier.usherb.ca>
    Re: Heinous - Nothing! (Fluffy)
    Re: Heinous - Nothing! (Martien Verbruggen)
        Help:  Looking for AI modules <jhscrimsher@uswest.net>
    Re: how do you search subdirectories for a file? (John Stanley)
    Re: Information from another homepage (Tad McClellan)
    Re: Installing modules on Win'95 <metcher@spider.herston.uq.edu.au>
    Re: lack of flock() for Win95/98? fix? <m.v.wilson@erols.com>
    Re: lack of flock() for Win95/98? fix? (Martien Verbruggen)
    Re: New to programming - New to Perl - LOST!!!! (Ben Coleman)
    Re: Off topic: is he that Larry Wall? (Ben Coleman)
    Re: Overloaded '.' wreaking havoc (David Alan Black)
        Perl "Packager" ??  (Statically-linked include files) <mkruse@rens.com>
    Re: Perl "Packager" ??  (Statically-linked include file (Martien Verbruggen)
    Re: Perl in the movie "Sphere"? <m.v.wilson@erols.com>
        Perl Programming Training <dmurray@dgesolutions.com>
    Re: Perl Y2K copmliance finsol@ts.co.nz
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 20 Oct 1998 02:53:42 GMT
From: yzhao@my-dejanews.com
Subject: Build DBD-Oracle-0.54 on Windows NT
Message-Id: <70gtvn$31m$1@nnrp1.dejanews.com>

Has anyone built DBD-Oracle-0.54 successfully on WindowS NT? When I ran the
Makefile.PL (see the trace below), it first complained that "ld" (should be
"link" instead") not
availaible, then almost every .lib file not found. It looked like the LIBS
setting (LIBS => [q[-LC:/Orant/OCI80/LIB/MSVC OCIW32]]) was casuing the
problem. Should I specify some other options to get it right?

Also, I tried to download the binary version of it from
www.activestate.com/packges (horrible page layout). It always tried to connect
localhost:4444. Anyone
downed from this URL before?

System: perl5.00502 Compiler: cl.exe -Od -MD -DNDEBUG -TP -GX -Od -MD
-DNDEBUG -TP -GX -DWIN32 -D_CO NSOLE -DNO_STRICT  -DHAVE_DES_FCRYPT
-DPERL_OBJECT Linker:  <ld not found>

MakeMaker (v5.4301)  ABSTRACT_FROM => q[Oracle.pm]  AUTHOR => q[Tim Bunce
(dbi-users@fugue.com)]	CAPI => q[TRUE]  DEFINE => q[]	DIR => []  EXE_FILES
=> [q[ora_explain]]  INC => q[-IC:/Orant/OCI80/include -IC:/Orant/rdbms/demo
-IC:\Perl\site\5 .00502\lib/MSWin32-x86-object/auto/DBI]  LIBS =>
[q[-LC:/Orant/OCI80/LIB/MSVC OCIW32]]  NAME => q[DBD::Oracle]  OBJECT =>
q[$(O_FILES)]  PREREQ_PM => { DBI=>q[0] }  SKIP => [q[processPL]] 
VERSION_FROM => q[Oracle.pm]  clean => { FILES=>q[Oracle.xsi] }  dist => {
DIST_DEFAULT=>q[clean distcheck disttest ci tardist], COMPRESS =>q[gzip -v9],
SUFFIX=>q[gz], PREOP=>q[$(MAKE) -f Makefile.old distdir] } Using
PERL=C:\Perl\5.00502\bin\MSWin32-x86-object\perl Potential libraries are
'-LC:/Orant/OCI80/LIB/MSVC OCIW32  oldnames.lib kernel32 .lib user32.lib
gdi32.lib  winspool.lib comdlg32.lib advapi32.lib shell32.lib ol e32.lib 
oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  versi
on.lib odbc32.lib odbccp32.lib PerlCRT.lib': 'OCIW32' found as
'C:/Orant/OCI80/LIB/MSVC\OCIW32.lib' 'oldnames.lib' not found as
'C:/Orant/OCI80/LIB/MSVC\oldnames.lib' 'oldnames.lib' not found as
'/lib\oldnames.lib' 'oldnames.lib' not found as '\oldnames.lib' Note
(probably harmless): No library found for 'oldnames.lib' 'kernel32.lib' not
found as 'C:/Orant/OCI80/LIB/MSVC\kernel32.lib' 'kernel32.lib' not found as
'/lib\kernel32.lib' 'kernel32.lib' not found as '\kernel32.lib' Note
(probably harmless): No library found for 'kernel32.lib' 'user32.lib' not
found as 'C:/Orant/OCI80/LIB/MSVC\user32.lib' 'user32.lib' not found as
'/lib\user32.lib' 'user32.lib' not found as '\user32.lib' ...

Thanks,

-- y.z.

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


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

Date: Tue, 20 Oct 1998 02:59:39 GMT
From: yzhao@my-dejanews.com
Subject: Build pRPC-modules-0.1005 on Windows NT
Message-Id: <70guar$3ko$1@nnrp1.dejanews.com>

I am trying to build pRPC-modules-0.1005 on Windows NT. The MakeMaker
complains that it needs Syslog.ph file. However there is no Syslog.h on MSVC
header files. Does this mean pRPC cannot be built on Windows NT? Is there any
workaround?

Thanks,

-- y.z.

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


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

Date: Tue, 20 Oct 1998 00:44:12 GMT
From: piercew@netscape.net
Subject: CGI problem...probably a simple answer.
Message-Id: <70gmcs$olj$1@nnrp1.dejanews.com>

I created the following as a way to parse a firewall log file.	For some
reason I can't get it to place each item on a new line:

#begin file
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<HTML>";
print "<BODY>";

open (fwfile, "fw2.log") || die "Couldn't open file: $!";

@data = split(/ /, <fwfile>);
foreach $line (@data) {
   print "$item\n";
   }

close (fwfile);
print "</BODY>";
print "</HTML>";


 I've tried placing the carrage return on a separate line and it doesn't work
either.  I know the data is being broken up, because I can print something
between each item.

 Thanks for any assistance that can be provided,

Wayne

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


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

Date: 20 Oct 1998 01:03:06 GMT
From: kevinfal@seas.upenn.edu (Kevin Falcone)
Subject: Re: CGI problem...probably a simple answer.
Message-Id: <slrn72noa9.ofn.kevinfal@blue.seas.upenn.edu>

Well, this isn't a perl problem, its really an HTML program, instead
of a newline, you need to be printing a <br> which your browser knows
to interpret as a newline
-kevin

On Tue, 20 Oct 1998, piercew@netscape.net <piercew@netscape.net> wrote:
>I created the following as a way to parse a firewall log file.	For some
>reason I can't get it to place each item on a new line:
>
>#begin file
>#!/usr/bin/perl
>
>print "Content-type: text/html\n\n";
>print "<HTML>";
>print "<BODY>";
>
>open (fwfile, "fw2.log") || die "Couldn't open file: $!";
>
>@data = split(/ /, <fwfile>);
>foreach $line (@data) {
>   print "$item\n";
>   }
>
>close (fwfile);
>print "</BODY>";
>print "</HTML>";
>
>
> I've tried placing the carrage return on a separate line and it doesn't work
>either.  I know the data is being broken up, because I can print something
>between each item.
>
> Thanks for any assistance that can be provided,
>
--
Kevin Falcone
kevinfal@seas.upenn.edu

If a cow laughed, would milk come out her nose?


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

Date: Tue, 20 Oct 1998 02:47:45 GMT
From: lincr@usa.net
Subject: change user password
Message-Id: <70gtkh$2t9$1@nnrp1.dejanews.com>

I want change a user's password using the function "crypt(NEWPASSWORD,SALT)" ,

but I don't know how to set the 'SALT' ,please tell me how.


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


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

Date: Tue, 20 Oct 1998 03:43:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: change user password
Message-Id: <PFTW1.47$6a4.247328@nsw.nnrp.telstra.net>

In article <70gtkh$2t9$1@nnrp1.dejanews.com>,
	lincr@usa.net writes:
> I want change a user's password using the function "crypt(NEWPASSWORD,SALT)" ,

crypt will only work if you have the crypt(3) function available on
your system. This probably means that you should be on a Unix system,
although there might be implementations for other systems. You did
read the documentation on perl's crypt?

# perldoc -f crypt

This gives an example, and also refers you to crypt(3). The example
also shows you where the salt ends up in an encrypted password.
So, depending on your flavour of OS:

# man 3 crypt
# man -s 3 crypt
# man -s 3C crypt

[snip]
     The key argument points to a string to be encoded (for exam-
     ple,  the user's password.)  Only the first eight characters
     are used; the rest are ignored. The salt is a  two-character
     string  chosen  from  the set [a-zA-Z0-9./].  This string is
     used to perturb the hashing algorithm in one  of  4096  dif-
     ferent ways.
[snip]

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd.       | enough features yet.
NSW, Australia                      | 


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

Date: 19 Oct 1998 23:06:02 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Cool company has Perl jobs!
Message-Id: <70gumq$5rp@panix.com>

Daniel Grisinger  <dgris@perrin.dimensional.com> wrote:
>Scratchie <upsetter@ziplink.net> writes:
>
>>                                            It won't be too long before MS
>> decides they need to include it with Windows. 
>
>They ship an ancient (5.001 based) version of perl on the NT resource
>kit.

Does that count as 5.001m points in their favor, or 5.001m points against?

That ancient version of perl shows (1) how old the NTRK is, and (2) how
M$ is interested in checking off function points as opposed to shipping
real or current tools.

Z.

PS: I got two bits of flint in a previous NTRK.



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

Date: Tue, 20 Oct 1998 01:21:45 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: count files....
Message-Id: <m3hfx0yr0x.fsf@rand.dimensional.com>

John Porter <jdporter@min.net> writes:

<snip me being confused>

> Maybe it's because you also quoted the whole script to the shell
> using single-quotes.  The first one prolly comes out looking like
> 
>     $ perl -e 'opendir (DIR, q|.|); $num = grep '
>            -f ', readdir DIR; print qq.$num\n.;'

Thanks, John.  It was two in the morning and it was confusing me.  I
knew something had to be wrong with my sample when I couldn't
reproduce the problem Saturday in the debugger.

It is interesting to know that using `=>' in place of `,' can cause
problems, though.  Something else to avoid, I guess.

dgris
-- 
Daniel Grisinger          dgris@perrin.dimensional.com
Supporter of grumpiness where grumpiness is due on clpm.
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Mon, 19 Oct 1998 22:35:20 -0400
From: J T-J <jtjohnston@erase.courrier.usherb.ca>
Subject: Heinous - Nothing!
Message-Id: <362BF6E8.5B19@erase.courrier.usherb.ca>

Come on this is a simple script. It writes to $datafile.
But when I call upon it to read $datafile, it reads nothing!

	$datafile =  "/home01/eslcafe/public_html/cgi-bin/cag/storedata.txt";

	open(HTMLFILE,"<$datafile");
	@inputData=<HTMLFILE>;
	close(HTMLFILE);

	print @inputData;

What heinous little thing have I forgotten?


Mail me if you can. I'm dumbfounded!!!


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

#!/usr/local/bin/perl -w

	$datafile =  "/home01/eslcafe/public_html/cgi-bin/cag/storedata.txt";


	require "/home01/eslcafe/public_html/cgi-bin/cgi-lib.pl";

&ReadParse;

###############################################################
	open(TEMPFILE,"<$datafile");
	@inputData=<TEMPFILE>;
	close(TEMPFILE);

	open(FILE,">$datafile");
	print FILE "<tr>\n";
	print FILE "<td WIDTH=\"30%\"
BGCOLOR=\"White\"><b>$in{'NAME'}</b></td>\n";
	print FILE "<td WIDTH=\"10%\"
BGCOLOR=\"White\"><b>$in{'AGE'}</b></td>\n";
	print FILE "<td WIDTH=\"25%\"
BGCOLOR=\"White\"><b>$in{'SCHOOL'}</b></td>\n";
	print FILE "<td WIDTH=\"25%\"
BGCOLOR=\"White\"><b>$in{'FROM'}</b></td>\n";
	print FILE "<td WIDTH=\"10%\"
BGCOLOR=\"White\"><b>$in{'CONTESTSCORE'}</b></td>\n";
	print FILE "</tr>\n\n";

	print FILE @inputData;
	close(TEMPFILE);

###############################################################

	print "Content-type: text/html\n\n";
	print "<html>\n";
	print "<head>\n";
	print "<title>Contest</title>\n";
	print "</head>\n";
	print "<body background=\"/eslcafe/graphics/spiral.gif\" text=black
link=blue vlink=blue alink=red bgcolor=BLUE>\n";

	print "<CENTER><A NAME=table></A>\n";
	print "<table BORDER=\"1\" CELLSPACING=\"2\" CELLPADDING=\"7\"
WIDTH=\"100%\">\n";
	print "<tr>\n";
	print "<td WIDTH=\"30%\" BGCOLOR=\"White\"><b>Name</b></td>\n";
	print "<td WIDTH=\"10%\" BGCOLOR=\"White\"><b>Age</b></td>\n";
	print "<td WIDTH=\"25%\" BGCOLOR=\"White\"><b>School</b></td>\n";
	print "<td WIDTH=\"25%\" BGCOLOR=\"White\"><b>Town</b></td>\n";
	print "<td WIDTH=\"10%\" BGCOLOR=\"White\"><b>Score</b></td>\n";
	print "</tr>\n";

		open(HTMLFILE,"<$datafile");
		@inputData=<HTMLFILE>;
		close(HTMLFILE);

	print @inputData;


	print "</table>\n";
	print "</CENTER>\n";

	print "<CENTER><IMG SRC=/eslcafe/graphics/colorbar.gif border=0
width=200 height=4><IMG SRC=/eslcafe/graphics/colorbar.gif border=0
width=200 height=4><IMG SRC=/eslcafe/graphics/colorbar.gif border=0
width=200 height=4></CENTER>\n";

	print "<CENTER>\n";
	print "<FORM>\n";
	print "<INPUT TYPE=\"button\" VALUE=\"Please Go Back\"
onClick=\"history\.back\(\)\">\n";
	print "</FORM>\n";
	print "</CENTER>\n";

	print "<HR>\n";
	print "<CENTER><H1>Thank you for your contribution\!</H1></CENTER>\n";


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

Date: 20 Oct 1998 03:04:47 GMT
From: fluffy@meow.org (Fluffy)
Subject: Re: Heinous - Nothing!
Message-Id: <slrn72nvee.3kl.fluffy@fluffy.meow.org>

meow Kitty?

> Come on this is a simple script. It writes to $datafile.
> But when I call upon it to read $datafile, it reads nothing!
> 
> 	$datafile =  "/home01/eslcafe/public_html/cgi-bin/cag/storedata.txt";
> 
> 	open(HTMLFILE,"<$datafile");
> 	@inputData=<HTMLFILE>;
> 	close(HTMLFILE);
> 
> 	print @inputData;
> 
> What heinous little thing have I forgotten?

To check whether the open worked?  $! is your friend.  I'll bet you an
ounce of lint that you forgot to make storedata.txt readable by the
wuhwuhwuh server, so you're reading a handle with nothing in it.



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

Date: Tue, 20 Oct 1998 03:38:15 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Heinous - Nothing!
Message-Id: <HATW1.46$6a4.247328@nsw.nnrp.telstra.net>

In article <362BF6E8.5B19@erase.courrier.usherb.ca>,
	J T-J <jtjohnston@erase.courrier.usherb.ca> writes:
> Come on this is a simple script. It writes to $datafile.
> But when I call upon it to read $datafile, it reads nothing!
> 
> 	$datafile =  "/home01/eslcafe/public_html/cgi-bin/cag/storedata.txt";
> 
> 	open(HTMLFILE,"<$datafile");

Not checking to see if your open succeeded.

open(HTMLFILE, $datafile) || die "Couldn't open $datafile for reading: $!";

> #!/usr/local/bin/perl -w

You use -w, good.
no strict? bad.

> 	open(TEMPFILE,"<$datafile");

same comment as above.

> 	open(FILE,">$datafile");

open(FILE, ">$datafile") || die "Couldn't open $datafile for write: $!";

If you want better error handling than a die, see if cgi-lib.pl gives
you some possibilities. Otherwise switch to CGI.pm or live with the
die. But you should _always_ check these things.

> 	print FILE "<tr>\n";

All of these prints would be better done with a here-doc syntax.

# perldoc perldata
/here-doc

> 	print FILE @inputData;
> 	close(TEMPFILE);

TEMPFILE is already closed. Did you mean to close FILE?

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

Again: a here-doc syntax is easier to read, and easier to maintain.

> 		open(HTMLFILE,"<$datafile");

check the return code.

Apart from those, I can't immediately see anything wrong. Once you
have the checks in place, maybe you'll get a message that will give
you some information.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: Mon, 19 Oct 1998 18:17:52 -0700
From: "John Scrimsher" <jhscrimsher@uswest.net>
Subject: Help:  Looking for AI modules
Message-Id: <362be361.0@news2.uswest.net>

I am looking into creating an internal Help Desk for the Corporation that I
work for, and would like to create it from scratch rather than spend
$100,000+ on purchasing the software, the only component that I am missing
though is  method to determine the most appropriate repsonse based on user
input to the script.

Does anyone know of any AI (Artificial Intelligence) modules that may be
available that I could set up rules to base responses on?  Any help is
appreciated greatly.

Thanks,

John Scrimsher
john_scrimsher@hp.com




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

Date: 20 Oct 1998 00:14:45 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: how do you search subdirectories for a file?
Message-Id: <70gkll$q07$1@news.NERO.NET>

In article <362BB559.120328AC@bcl.net>, Rob Bridal  <rbridal@bcl.net> wrote:
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML>
>Make your own recursive thing.

Why not use File::Find?

><P>sub PrintDirRec {

I think the extra text will cause syntax errors when you try running
this code. I do hope you tested the open when you created the P
filehandle.

><BR>&nbsp;&nbsp;&nbsp; my $file, $dir = $_[0];

And the BR filehandle. Why are you trying to read from that file here?




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

Date: Mon, 19 Oct 1998 18:24:45 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Information from another homepage
Message-Id: <tnhg07.104.ln@flash.net>

Edward van Bilderbeek (edward@ch.twi.tudelft.nl) wrote:

: does anyone know how I can get information from another homepage (which
: Perl-command(s)). I want to get the temperature in London from a
: weatherchannel imported on my side. Is there a way to get the data/HTML
: source of such a file to your homepage?


   use LWP::Simple;


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


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

Date: Tue, 20 Oct 1998 10:38:38 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Installing modules on Win'95
Message-Id: <362BDB8E.DA448746@spider.herston.uq.edu.au>

I seem to recall that one of the perl README's states that the perl
makefiles will work with dmake or nmake, but not with GNU (i.e. cygwin)
make.  I also seem to recall that your average makefile is going to bomb
under Win95 anyway, because of problems (i.e. things missing) with the
command shell.

-- 
Jaime Metcher

-- 
Jaime Metcher

olrcc@scisun.sci.ccny.cuny.edu wrote:
> 
> Hi everybody,
> 
> I'm having a problem with installing Perl Modules on Windows 95.
> I've got ActiveState Perl 5.005002 built and Cygwin port of make
> (latest release).
> 
> Doing the standard routine
> 
> 1. perl Makefile.PL <-- fine
> 2. make <-- produces an error
>    Makefile:644: *** missing separator
> The offending string and next two lines look like this
> 
> $(PM_TO_BLIB)
> <<
>         @$(TOUCH) $@
> 
> I tried to install different modules to no avail. BTW, this particular one
> is Math-MatrixReal-1.2.
> 
> Any suggestions,
> 
> Thanks in advance
> 
> Oleg,
> 
> learning Perl
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


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

Date: Tue, 20 Oct 1998 01:18:00 +0000
From: WMWilson <m.v.wilson@erols.com>
Subject: Re: lack of flock() for Win95/98? fix?
Message-Id: <362BE4C8.6169F041@erols.com>

Jan VanderStoel wrote:
> 
> I attempted to run a Perl script using the flock() function on a Win 98
> platform using Perl 5.005.  The script failed giving an error message saying
> that the flock() function is not implemented on this platform.  The docs do
> not indicate that flock() is not implemented.  This script does work on Win
> NT 4.  Is there a fix for the Win 95/98 platform?
> 
> TIA,
> 
> Jan VanderStoel

I haven't used perl on Windoze, but if I'm not mistaken, lockf should do
the trick, I believe it's the perl-implemented "cross-platform"-esque
version of flock, but don't qw(me, on, that).
-- 
		\||/
		(..)
    +---oOOo-----(_)-----oOOo-----+
    | mailto:m.v.wilson@erols.com |
    |	       WMWilson	  	  |
    |__USCS Data Center Sysadmin__|


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

Date: Tue, 20 Oct 1998 02:29:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: lack of flock() for Win95/98? fix?
Message-Id: <0ASW1.37$6a4.217717@nsw.nnrp.telstra.net>

In article <362BE4C8.6169F041@erols.com>,
	WMWilson <m.v.wilson@erols.com> writes:

> I haven't used perl on Windoze, but if I'm not mistaken, lockf should do
> the trick, I believe it's the perl-implemented "cross-platform"-esque
> version of flock, but don't qw(me, on, that).

Possible attempt to separate words with commas at - line 3.
(-w would have warned you about the commas :))

I won't qw( you on that ), because:

# perldoc -f lockf
No documentation for perl function `lockf' found

Maybe you're confused with with lockf(3), which may be called by
perl's flock.

# perldoc -f flock
=item flock FILEHANDLE,OPERATION

Calls flock(2), or an emulation of it, on FILEHANDLE.  Returns TRUE for
success, FALSE on failure.  Produces a fatal error if used on a machine
that doesn't implement flock(2), fcntl(2) locking, or lockf(3).  flock()
is Perl's portable file locking interface, although it locks only entire
files, not records.
[snip]
Note that the emulation built with lockf(3) doesn't provide shared
locks, and it requires that FILEHANDLE be open with write intent.  These
are the semantics that lockf(3) implements.  Most (all?) systems
implement lockf(3) in terms of fcntl(2) locking, though, so the
differing semantics shouldn't bite too many people.

Maybe activestate has the real answer in the faq somewhere. It's too
slow for me to find it.
http://www.activestate.com/support/faqs/win32/

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm just very selective about what I
Commercial Dynamics Pty. Ltd.       | accept as reality - Calvin
NSW, Australia                      | 


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

Date: Tue, 20 Oct 1998 00:30:50 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: New to programming - New to Perl - LOST!!!!
Message-Id: <362bd994.940079873@news.mindspring.com>

On Fri, 16 Oct 1998 01:06:18 +0100, "Tim Hicks" <tim.hicks@lineone.net>
wrote:

>Do you think I'll be able to get by with the version that I have as I have
>already shelled out 20 quid for the book and had a bit of a thumb through.
>If it's no good at all, I guess I'll have to see about getting a different
>book, but I don't really want to.

For learning Perl itself, it should be fine - you will just have an
occasional Unixism you may have to wrap your head around.

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


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

Date: Tue, 20 Oct 1998 01:42:38 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: Off topic: is he that Larry Wall?
Message-Id: <362bea57.944371183@news.mindspring.com>

On Fri, 16 Oct 1998 15:49:30 -0700, lr@hpl.hp.com (Larry Rosler) wrote:

>He seems to have returned recently to activity in this newsgroup 
>after a sabbatical of sorts.

Sounds like a strange way to spend a sabbatical(or would that be a sorting
sabbatical?).

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


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

Date: 19 Oct 1998 20:06:36 -0400
From: dblack@pilot.njin.net (David Alan Black)
Subject: Re: Overloaded '.' wreaking havoc
Message-Id: <70gk6c$oje$1@pilot.njin.net>

Hello -

Uri Guttman <uri@camel.fastserv.com> writes:

>>>>>> "LJ" == Lee Jones <leej@diver.engr.sgi.com> writes:

>  LJ> I've got a class that I'm building for a hardware simulator
>  LJ> language, and in it, I've overloaded many of the operators to do
>  LJ> multiple state arithmetic.  All was going well until I overloaded
>  LJ> the '.' operator.  Now, code such as:

>  LJ>      print("objA = $objA\n");

>  LJ> (where $objA has been blessed into the class) causes a call to my
>  LJ> concatentation operator, for no apparent reason.  I haven't had
>  LJ> this problem with (e.g.) the '+' overload.  I expect the above
>  LJ> code to call my stringify() function, but it doesn't (or hasn't by
>  LJ> the time it calls the concatentation operator, with fatal
>  LJ> results).

>  LJ> What am I doing wrong?

>not much. but you don't realize that interpolation in perl5 is just done
>with a compilation conversion to a series of . operations. you can work
>around it by doing:

>	print( "objA = ", $objA, "\n");

>or if you want to force stringify:

>	print( "objA = ", "$objA", "\n");

>it's an obscure concept that reared its ugly head for you. i don't know
>of another way to stop the call to your overloaded .


For what it's worth, this also seems to work:

	print "objA = @{[$objA]}\n";


Complete testbed:

package over;

sub new { my $p = shift; bless [@_], $p }
use overload '.' => \&dot,  fallback => 1;
sub dot { "NOT WHAT YOU WANT!" }

package main;

my $objA = new over;

print "objA = $objA\n";
print "objA = @{[$objA]}\n";
__END__



David Black
dblack@pilot.njin.net



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

Date: Mon, 19 Oct 1998 20:26:00 -0700
From: "Matt Kruse" <mkruse@rens.com>
Subject: Perl "Packager" ??  (Statically-linked include files)
Message-Id: <70gos6$e5h$1@news1-alterdial.uu.net>

Is there such a thing as a "Perl Packager"??

The concept is similar to statically-linking DLL's. Let's
say my perl program "requires" some other files, but for the
final release I want to have everything included in one single
file to make sure that the WHOLE PACKAGE is included.

Is there an easy way to do this?

As a side benefit, I could also keep my routines in their own
modules and update as necessary, always knowing that when I 
"build" a release the latest versions will be included in with
the single file that I send.

Does that make sense?




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

Date: Tue, 20 Oct 1998 02:32:57 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl "Packager" ??  (Statically-linked include files)
Message-Id: <tDSW1.39$6a4.217717@nsw.nnrp.telstra.net>

In article <70gos6$e5h$1@news1-alterdial.uu.net>,
	"Matt Kruse" <mkruse@rens.com> writes:
> Is there such a thing as a "Perl Packager"??

# perldoc CPAN
look for Bundles

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd.       | make a better idiot.
NSW, Australia                      | 


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

Date: Tue, 20 Oct 1998 01:44:07 +0000
From: WMWilson <m.v.wilson@erols.com>
Subject: Re: Perl in the movie "Sphere"?
Message-Id: <362BEAE7.5252D22C@erols.com>

Brendan O'Dea wrote:
> 
>   [posted & mailed]
>   [resurrecting an old thread from February]
> 
> In article <ORWANT.98Feb23162046@cyrano.media.mit.edu>, Jon Orwant
> <orwant@cyrano.media.mit.edu> wrote:
> >
> >mcafee@battlezone.rs.itd.umich.edu (Sean McAfee) writes:
> >
> >   I just got back from seeing the new movie "Sphere", and I think I saw part
> >   of a Perl script on a computer screen at one point.  Perhaps someone else
> >   can verify this, having also seen it or looking for it in the future...
> >
> >If anyone can positively identify the code, I'd love to mention it
> >in the next issue of The Perl Journal.
> 
> Heh.  I though the same when I watched _Sphere_ on video last night, so
> I paused the tape to see exactly what the magic `commands' Harry typed
> to translate the message were:
> 
>   $BSD = -f '/vmunix'; if ($BSD) { system "BIN
>   cbreak </dev/tty >/dev/tty 2>&1
> 
> appeared to be the first, and
> 
>   set_cbreak(0)
>       local($on) = $_[0];
>       local($sgttyb,@ary);
>       require 'sys/ioctl.ph';
>   [snip]
> 
> is most of the second.  After digging around, I found almost exact
> matches for both fragments in an *old* version of Tom's FAQ:
> 
>   Version: $Id: perl-intro,v 1.5 93/10/02 00:32:46 tchrist Exp Locker: tchrist $
> 
>   [snip]
> 
>   2.9) How can I read a single character from the keyboard under UNIX and DOS?
> 
>   [snip]
> 
>   $BSD = -f '/vmunix';
>   if ($BSD) {
>       system "stty cbreak </dev/tty >/dev/tty 2>&1";
>   }
> 
>   [snip ~16 lines]
> 
>   sub set_cbreak { # &set_cbreak(1) or &set_cbreak(0)
>       local($on) = $_[0];
>       local($sgttyb,@ary);
>       require 'sys/ioctl.ph';
> 
>   [snip]
> 
> It seems unlikely that these were taken from a single script, since they
> are different ways to do the same thing.
> 
> Given also that these fragments occurred in the same order as the two
> examples given in the FAQ answer, maybe they were taken from it
> directly.
> 
> Regards,
> --
> Brendan O'Dea                                        bod@compusol.com.au
> Compusol Pty. Limited                  (NSW, Australia)  +61 2 9809 0133

Gee, I hope that FAQ wasn't GPL'd =)
-- 
		\||/
		(..)
    +---oOOo-----(_)-----oOOo-----+
    | mailto:m.v.wilson@erols.com |
    |	       WMWilson	  	  |
    |__USCS Data Center Sysadmin__|


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

Date: Tue, 20 Oct 1998 02:38:17 GMT
From: "Deborah Murray" <dmurray@dgesolutions.com>
Subject: Perl Programming Training
Message-Id: <01bdfbd3$f833fdb0$e798c9d0@debhome>

UniForum Technology Training Institute Presents:

Accelerated Perl Workshop
December 16-17, 1998 - and- January 29-30, 1999
San Jose, CA
For more information, call 1-800-333-8649 or visit the Web @
www.uniforum.org




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

Date: Tue, 20 Oct 1998 02:59:16 GMT
From: finsol@ts.co.nz
Subject: Re: Perl Y2K copmliance
Message-Id: <70gua4$3km$1@nnrp1.dejanews.com>

Ron
An article I had published last week describes what could be a major
problem with some Perl applications (and several other languages) - the booby
trap code problem. Check it out at:
http://www.idg.co.nz/WWWfeat/Y2000/amon1005.htm

--
Financial Solutions Limited
http://www.ts.co.nz/~finsol/

In article <70fdqa$hnh$1@newsreader2.core.theplanet.net>,
  "Ron Hejdeman" <ron@hejdeman.freeserve.co.uk> wrote:
> Hi,
>
> Anyone out there know if perl is Y2K compliant on Suns and Win-95 ?
>
> BR,
>
> Ron.
>
> ____________________________________________________________________________
> _
>
>      _/_/_/    _/_/   _/_/    _/      Ron Hejdeman
>     _/   _/  _/   _/ _/ _/   _/       Email:  hejdeman@acapella.co.uk
>    _/_/_/   _/   _/ _/  _/  _/        Tel:    +44 (0) 1703 769008
>   _/  _/    _/  _/ _/   _/ _/         Fax:    +44 (0) 1703 768612
>  _/    _/   _/_/  _/    _/_/          Mobile: +44 (0) 802  591928
>
>                               Acapella Limited
>    Delta House, Chilworth Research Centre, Southampton, SO16 7NP, England
> ____________________________________________________________________________
> __
>
>

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


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

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

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