[6771] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 396 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 30 07:07:13 1997

Date: Wed, 30 Apr 97 04:00:20 -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           Wed, 30 Apr 1997     Volume: 8 Number: 396

Today's topics:
     Re: Any graphic module available? (Karl Glazebrook)
     Re: BASH & CGI -- HTML call to BASH <jroemer@spiderpub.com>
     Deep inside Perl - What's happening to cause segmentati <wayne@cta-challenge.com.au>
     Re: Die problem (Honza Pazdziora)
     Re: I/O on serial device? <jwz@netscape.com>
     Re: Multi line matching problem. Should be simple?!? (Tad McClellan)
     Re: Notice to antispammers <mkruse@shamu.netexpress.net>
     Re: Object IDs are good ( was: Object IDs are bad ) <wg@cs.tu-berlin.de>
     Re: Ousterhout and Tcl lost the plot with latest paper (Cyber Surfer)
     Re: Perl auto-replier (Mark Mills)
     Perl4 script under Perl5 interpreter <lokiwebltd@aol.com>
     Q: Extracting multi-line text between keywords (Stephan Petersen)
     Q:Perl for AS400 (OS400) <thielmann@11.kblz1.telekom400.dbp.de>
     Re: question: how to trim a string passed via hard refe (David Alan Black)
     servers/chmod and stuff (Michael R. Bagnall)
     Solaris Software Package Archive (Mark (Mookie))
     Re: split returns erroneous value on a line beginning w (Brooks Davis)
     Re: split returns erroneous value on a line beginning w (David Alan Black)
     Waiting for complete upload ? <kerviler@francenet.fr>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 29 Apr 1997 23:39:01 -1000
From: kgb@aaoepp.aao.gov.au (Karl Glazebrook)
Subject: Re: Any graphic module available?
Message-Id: <5k73vl$i7g@pa.jach.hawaii.edu>


In article <335F8D82.1805@soft-tek.com>, Mike Christensen <mike@soft-tek.com> writes:
>fish wrote:
>> 
>> Hello..
>> 
>> I use perl to write CGI programs, it will process some data and then
>> draw a graph and send back to the browser..
>> Is there any module that can handle this?
>> I know pgerl, but it require fortan compiler....
>> and gnuplot can't draw gif file....
>> any other available? Thanks a lot!

And what is wrong with requiring a fortran compiler?

gnu-77 is free, compiles pgplot just fine, and binaries can be 
installed within minutes.

However I HAVE contemplated running the whole damn library through
f2c and redistributing THAT. A round tuit is needed - and I need
to ask permission too.

Karl




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

Date: Wed, 30 Apr 1997 00:27:18 -0500
From: "J. Roemer" <jroemer@spiderpub.com>
Subject: Re: BASH & CGI -- HTML call to BASH
Message-Id: <3366D836.309C@spiderpub.com>

> ++ (If this isn't the appropriate newsgroup,
> ++ could you point me in the right direction?
> ++ Thanks!)
> 
> It isn't. This is a group about perl (I don't know why they call it
> comp.lang.perl.misc, sci.sports.vacuum-cleaners would have been
> so much more obvious).
> 
> You can ask CGI questions in the cgi group
> (comp.infosystems.www.authoring.cgi) and bash questions in
> in comp.unix.shell, or in one of the gnu groups.
> 
> Abigail


Thanks for sharing, Abigal.  
Your wit helps me on so many levels.
I thank you.

Jim Roemer


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

Date: Wed, 30 Apr 1997 20:16:53 +1000
From: Wayne Blick <wayne@cta-challenge.com.au>
Subject: Deep inside Perl - What's happening to cause segmentation fault?
Message-Id: <33671C15.16E9@cta-challenge.com.au>


This is a multi-part message in MIME format.

--------------53F7532B5787
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Using a signal (sample code attached) causes Perl to lose it's way
resulting in a "segmentation fault" (after several repetitions).

Any way around this?

Sample from Jack Shirazi's EventServer follows:

--------------53F7532B5787
Content-Type: application/x-perl; name="sig.pl"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="sig.pl"

IyEvdXNyL2Jpbi9wZXJsIC13Cgp1c2Ugc3RyaWN0Owp1c2UgZGlhZ25vc3RpY3M7CgpteSBA
YSA9IHF3KCAxIDIgMyk7Cm15ICRzaWdfaGFwcGVuZWQgPSAwOwoKJFNJR3tBTFJNfSA9IFwm
c2lnX2hhbmRsZXI7CmFsYXJtKDEpOwoKd2hpbGUgKDEpIHsKCiAgICBteSAkejsKICAgIGZv
cmVhY2ggJHogKCBAYSkgewoKICAgIG15ICRhOwogICAgbXkgJGI7CiAgICBteSAkYzsKICAg
ICAgICByZXNldF9oYW5kbGVyKCkgICAgaWYgJHNpZ19oYXBwZW5lZDsKICAgIH0KfQoKCnN1
YiByZXNldF9oYW5kbGVyIHsKCiAgICBwcmludCAiUmVzZXQgaGFuZGxlclxuIjsKICAgICRz
aWdfaGFwcGVuZWQgPSAwOwojIyMjICAgICRTSUd7QUxSTX0gPSAnc2lnX2hhbmRsZXInOyAg
ICAgIyBMaW51eCBPSwogICAgYWxhcm0oMSk7Cn0KCgpzdWIgc2lnX2hhbmRsZXIgewoKICAg
ICRzaWdfaGFwcGVuZWQgPSAxOwp9Cgo=
--------------53F7532B5787--



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

Date: Wed, 30 Apr 1997 09:02:46 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Die problem
Message-Id: <adelton.862390966@aisa.fi.muni.cz>

bblohm@boi.hp.com (Bill Blohm) writes:

> I'm running Perl 5.001m. I wrote a small (very!) Perl program
> to simply replace LF with LF/CR on each line of the input file,
> and to save the original as <filename>.old.  The original program,
> listed below, works fine: 
> 
>      #!/usr/local/bin/perl -pi.old
>      s/\n/\n\r/g;
> 
> Once I had this working, I handed it off to the user that requested
> the program. A few days later he came back, admitted he'd forgotten
> how to use it, and asked how to use it. I explained how, and decided
> to put a usage clue in there for anyone else that wanted to use it,
> (or this user if he forgot again). That's when my problems started.
> 
> I added the die line as shown below, and then found out several
> things:
> 
>      #!/usr/local/bin/perl -pi.old
>      die "Usage: cradd <filename>\n" if @ARGV < 1;
>      s/\n/\n\r/g;

You use the parameter -p which means 

while (<>) { }
continue { print; }

around your script. What you probably want is to force the die to be
at the beginning of the script, using

BEGIN { die "Usage: cradd <filename>\n" unless @ARGV; }

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Wed, 30 Apr 1997 00:20:48 -0700
From: Jamie Zawinski <jwz@netscape.com>
Subject: Re: I/O on serial device?
Message-Id: <3366F2D0.97090098@netscape.com>

I wrote: 
> I want to have a Perl script that talks to my modem.  This doesn't
> work:
[...]

Abigail wrote:
> 
> Four things:
> - You didn't use perl -w.
> - You didn't check the return value of open.
> - You should have used '+<' in the open.
> - You didn't use perl -w.

Yeah, the +< thing was a bug that I had actually fixed before my post.
But I'm still in a world of hurt.  Here's how I'm opening it now:

	$modem_device = "/dev/ttyd1";

	sub open_modem {
	    use FileHandle;

	    my $sttyargs = "raw -echo -echonl cs8 -clocal cnew_rtscts 1200";
	    system("/bin/stty $sttyargs < $modem_device");

	    sysopen(MODEM, $modem_device, O_RDWR|O_NDELAY)
		|| die("opening $modem_device: $!");

	    MODEM->autoflush(1);
	}

I thought the "stty" command would help, but it doesn't.  The problem 
I'm having, basically, is that characters aren't showing up, or are 
getting mangled.  

What I'm trying to do is use my modem as a Caller-ID device; I want the 
script to simply open up the serial device, and wait for the modem to 
produce output; then interpret those lines.  Sounds simple, 
right?

If I run "seyon" (a terminal emulator thingy) then I see the data that 
the modem prints, and it's never, ever corrupted: the output I expect 
shows up 100% consistently in seyon's window.  So this indicates that 
it's not a problem with the modem or with the serial cable.  I guess 
that means that I'm not opening the device properly.

The output the modem produces when the phone rings looks like this:

	RING
	TIME: 04-28 20:16 
	CALLER NUMBER: 4151234567
	
	RING

what my script is seeing looks (most often) like this:

	
	RING
	
	TIME: 04-28 2^@^@^@x
	I151234567
	
	
	
	RING

I get double-spacing (two \n's in a row -- not \r\n) and mangled and 
dropped characters.

I get the same output when I do this in the shell:

	( /bin/stty raw 2400 < /dev/ttyd1 ; cat /dev/ttyd1 )

which seems to say that tcsh is opening the device in much the same 
(wrong) way that my perl script is...

I don't really understand the difference between the devices /dev/ttyf1,
/dev/ttyd1, and /dev/ttym1 (on Irix 6.2.)  It doesn't seem to make a 
difference, though -- they all lose.  (Oh, except that on one of them, 
the `stty' hangs.)

I looked at what seyon does, and it seems to be opening /dev/ttyf1 
(which I also tried) and doing something like this:

    struct termios io = { 0, };
    if (tcgetattr(fd, &io)) {
	perror("tcgetattr");
	exit(-1);
    }
    cfsetospeed(&io, B1200);
    cfsetispeed(&io, B1200);

Perhaps that's what I'm missing (doesn't seem likely, though...) but 
I can't figure out how to do that in perl 5.002 -- it looks like the 
tcgetattr stuff isn't actually defined in POSIX.pm ?

Here's another simple example that I think should work fine, but that 
doesn't work at all.  With ttyf1 and ttyf1, the open() call never 
returns.  With ttyd1, that works, but output gets dropped, and then 
eventually it hangs (it never prints the "RING" lines, for example):

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

	use FileHandle;

	$modem_device = "/dev/ttyd1";
	open(MODEM, "+<$modem_device") || die("device error: $!");
	print "opened...\n";
	MODEM->autoflush(1);

	print MODEM "AT\r\n";
	print MODEM "ATZ\r\n";		# reset
	print MODEM "ATE0\r\n";		# don't echo commands
	print MODEM "ATM0\r\n";		# turn off speaker
	print MODEM "ATN0\r\n";		# turn off ringer
	print MODEM "ATS40.2=1\r\n";	# turn on cid

	while (<MODEM>) {
	    print "==> $_";
	}

produces the output

	==> AT
	==> 
	==> 
	==> OK
	==> 
	==> ATZ

and then nothing more...  However, if I put a "sleep 1" before each
"print MODEM" line, then I get more output!  Including all of the
OK's that should have been printed, and the RING lines, and also 
(eventually) including mangled characters.

Help, help.

-- 
Jamie Zawinski    jwz@netscape.com   http://www.netscape.com/people/jwz/
What the world needs now is killfiles that actually kill. -Craig Dickson


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

Date: Tue, 29 Apr 1997 20:57:24 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Multi line matching problem. Should be simple?!?
Message-Id: <4u86k5.37a.ln@localhost>

David Alan Black (dblack@icarus.shu.edu) wrote:
: Hello -

: Pascal Houde <houde@fox.cisti.nrc.ca> writes:

: >Here's a small example of what I want to do:

: >$var="some\nthing"
: >$var =~ s/something/blablabla/;
: >print $var; # which would print blablabla

: >But this doesn't work even if I specify $*=1 and/or $/ =""

: >I don't want to do something like:
: >$var =~ s/some\nthing/blablabla/; or $var =~ s/so.*ing/blablabla/s;
: >because I never know where the word is cut by a new line and
   ^^^^^^^

And because it matches a whole bunch of things that you don't want
to match, such as:

soaking
soaping
soaring
sobbing
sobering
socializing
socking
softening
soiling
soldiering
soliciting
solidifying
solving
something
soothing
sorting
sounding
soundings
souring
sponsoring

;-)


: >I want an accurate search. (so forget about the "." trick and /s)
                                  ^^^^^^^^^^^^                   ^^

: Perhaps:

: $var = "some\nthing something else";
: $var =~ s/some\n?thing/blablabla/gs;

: even though it uses the dreaded s///s.... :-)
                          ^^^^^^^     ^

$var =~ s/some\n?thing/blablabla/g;  # works fine without 's' modifier...

( you just put it in there because Pascal said not to. Right?  
  I don't take direction well either ;-)



's' modifier has no effect if there are no dots in your regex.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 30 Apr 1997 04:02:38 GMT
From: Matt Kruse <mkruse@shamu.netexpress.net>
Subject: Re: Notice to antispammers
Message-Id: <5k6g8u$e16@news1-alterdial.uu.net>

Had this thread been started by anyone other than Tom, he and others 
would surely have responded with the 'This has nothing to do with Perl, 
now go somewhere else' by now.

I find it almost humorous that Tom brings up this non-perl issue in a 
group that he and others so adamantly try to keep focused on Perl, then 
backs out and doesn't respond to challenges of his idea.

Face it: no one can control anyone else.  If Tom builds his list (which I 
think is a ridiculous waste of time and quite rude, but that's just MO) 
no one else can stop him.  If people use anti-spam From: addresses, Tom 
can't stop them.  So who cares?

Let Tom make his list.  Let him waste his time tracking down users.  Let 
him make a large group of enemies.  Let people keep trying to fake their 
addresses.

Who really cares?

Do you guys really have time for this junk?

-- 
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/                       http://www.mkstats.com/
---------------------------------------------------------------------------


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

Date: 30 Apr 1997 10:12:42 +0200
From: Wolfgang Grieskamp <wg@cs.tu-berlin.de>
Subject: Re: Object IDs are good ( was: Object IDs are bad )
Message-Id: <1og1w9apz9.fsf@cs.tu-berlin.de>

doylep@ecf.toronto.edu (Patrick Doyle) writes:

>   Can you give an example of two immutable objects, alike in every way,
> which need to be distinguished?

Two read-only windows in a GUI with the same contents (and
the application doesn't know about internal WM information such as position
or other attributes which may distinguish them).

Two outgoing socket connections to the same destination (and the
application again doesn't know about internal states of the sockets).

In general, this situation is quite common in modelling input/output,
since in this case applications tend to have an incomplete or `loose'
view on the outside world.

Wolfgang

-- 
wg@cs.tu-berlin.de  http://uebb.cs.tu-berlin.de/~wg/


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

Date: Wed, 30 Apr 1997 08:52:07 +0100
From: cyber_surfer@gubbish.wildcard.demon.co.uk (Cyber Surfer)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <MPG.dd101d469ea144e9897a2@news.demon.co.uk>

With a mighty <5k2v86$e2@lyra.csx.cam.ac.uk>,
ljw1004@cus.cam.ac.uk uttered these wise words...

> I think this is a silly debate. You could write it in C++Builder, and
> select the button in the integrated development environment, and click on
> the 'font' button, and select a font for it graphically, without any lines
> of code. So what?

I said something like this a while ago, but I guess nobody noticed. 
Code generators for MFC/C++ aren't the only way of doing this. VB did 
it a little earlier, Pascal programmers can do it with Delphi - and 
this is just for Windows!

Some Lisp programmers have done it, too, but these tools have tended 
to be for X Windows. I think that Garnet has an interface builder, but 
not all of them are for Common Lisp.

Yes, this is very silly. Pick an app with 400 forms, and you might 
find some significant differences, but a simple "Hello, World" app 
will tells us _nothing_. That same argument can be used to justify 
tools like WinBatch (yep, build your app in a language that makes 
Basic look sophisticated! Never mind Tcl...) in just a couple of lines 
of source code. It could even justify using assembly language, so that 
the object code will be small enough.

When you have 400 forms, perhaps tools like ObjectVision make more 
sense, but I don't know if it's still available. Ok, just build the 
same kind of abstractions in another language, perhaps by using sexprs 
in Lisp (or Prolog, or any language that you can build an sexpr parser 
with), writing your forms in your domain-specific meta-language, and 
then compile it into, say, Lisp expressions that build the user 
interface using your chosen tool (Garnet, Tk, CLIM, whatever).

You could even compile them into C++ code using MFC, OWL, V, or some 
other C++ framework. V would give you Windows _and_ X Windows. It 
might even give you Mac support, but I don't know if that's been added 
yet. Alternately, how about compiling to HTML forms and CGI code (C, 
Perl, Java, etc), or just go for Java and the AWT.

The important thing is that you'd have complete control over the meta 
language and the abstractions that it uses, the code for the forms 
could do whatever you wanted (like specifying validation formats, 
compiling reg-exprs to state automata), and because the expressions 
are s-exprs, they're easily manipulated, unlike strings. This means 
that when you make some fundamental change to your meta language, you 
can let the machine to the rewriting.

If you have 400+ forms, this could be a _big_ win. This is isn't an 
articifical example, BTW. Some people actually write such apps. If 
they use tools like ObjectVision, it's likely that they won't get the 
same leverage that a programmer who builds a domain specific meta 
language will get. Even for smaller apps, you can still win big, esp 
if the effort to build the meta language is small enough, which it 
often will be.

Followups adjusted, for the benefit of the perl, python and eiffel 
people who don't appreciate this thread. If you know this stuff 
already, then I apologise for wasting your time.
-- 
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
  Martin Rodgers | Programmer and Information Broker | London, UK
            Please note: my email address is gubbish.


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

Date: Wed, 30 Apr 1997 05:12:02 GMT
From: mark@ntr.net (Mark Mills)
Subject: Re: Perl auto-replier
Message-Id: <3366cf5e.83684961@news.ntr.net>

On 29 Apr 1997 16:40:42 GMT, Tom Christiansen <tchrist@mox.perl.com>
wrote:

>When >90% of anything you read is dreck, you tire of suffering
>fools gladly.  This newsgroup is no longer worth wasting time
>reading, or contributing to.  
>
>:P.S.  I'm afraid I've never seen a posting by Larry - that two week
>:thing, again.
>
>It got to be too much for him.  When something's too much for him,
>he bails.  I, on the other hand, got pissy and tried to stick with it.
>I was wrong, twice, but I'm through with those mistakes.  I go now to
>join Larry in that great Perl heaven far removed from Usenet.
>
>	Tom Christiansen	tchrist@jhereg.perl.com

Now, that is the worst _news_ I've heard in weeks.  I've been lurking
on c.l.p.m for months now and when I look at my hold file I see that
80% of the messages I've hung on to for reference or future perusal
are from you and Randal.

I learned perl from both of your posts, the Camels (bought both :>
darn my timing), and experimenting with the FAQs on perl.com/perl/

It's your fault I'm any good at this language.  A great deal of the
company I work for is automated in perl I wrote and _helped_ others
write. Note that _helped_ part.  I never tried to teach anyone else
Lisp, Basic, ASM, Pascal, or expected a community to rise up around
C++.  Perl is special to us BECAUSE it is expected to be shared and
retaught.  I only hope that some of us can rise to fill your shoes.

On a lighter note...

What we need is a c.l.p.moderated that has a passthru feature.  Maybe
just the first post is autoreply'ed and a request must be sent to a
email/majodomo type signup that would gain entrance to those who read
the faq (and maybe answered 4 questions with easy to find answers in
the faq)  Automated or semi-automated moderation would seem a possible
solution to the actual tedium of handling 2000+ messages a week.
-- 
[Hopper, Dennis]: There's mines over there, there's mines over 
there, and watch out those goddam monkeys bite, I'll tell ya.
==Apocalypse Now==


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

Date: Wed, 30 Apr 1997 01:55:27 -0700
From: LokiWebLtd <lokiwebltd@aol.com>
Subject: Perl4 script under Perl5 interpreter
Message-Id: <336708FF.3965@aol.com>

I'm having a problem with opening and writing files using perl5.
The following command is what originally came with the script.
     open(NEWFILE,">$basedir/$mesgdir/$num\.$ext") || die $!;
Of course this caused an error on the perl5 interpreter.
I have fixed the line to
     open(NEWFILE,">$basedir/$mesgdir/$num\.$ext" || die $!);
this avoids the error however the file is not getting written.
  Thanks in advance to anyone who can help with this..


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

Date: 30 Apr 1997 09:54:14 GMT
From: sp@gtt-ws3.lth.rwth-aachen.de (Stephan Petersen)
Subject: Q: Extracting multi-line text between keywords
Message-Id: <5k74s6$pv5$1@news.rwth-aachen.de>


Hi,

I was wondering whether there's a simple (and preferably elegant :-)
way to extract the text from a file embedded between "begin" and "end"
markers like this:

--begin <keyword>---
line 1
line 2
line 3
 .
 .
 .
line x
--end <keyword>---

<keyword> can be one of several possible. One data block consists of
these chunks for all of the several keywords, the input file has many
of these blocks (sort of like a free-form text file database).

I looked at regular expressions, but I didn't really find documentaion
and examples on this type of problem. I don't even know at the moment
whether this can be handled with regexs at all, or whether I have to
employ auxiliary logic...

If anybody can give me a pointer of what to try or where to look, I'd
be grateful.

Thanks in advance,
Stephan

--
Stephan Petersen
@work: sp@gtt.lth.rwth-aachen.de       @home: S.Petersen@sushi.tng.oche.de

>-=-=-=-=-=-= Visit my Technical Thermochemistry Web Page at =-=-=-=-=-=-<
>-=-=-=-=-=-=    http://gttserv.lth.rwth-aachen.de/~sp/tt/   =-=-=-=-=-=-<




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

Date: Wed, 30 Apr 1997 07:55:19 +0200
From: Marcus Thielmann <thielmann@11.kblz1.telekom400.dbp.de>
Subject: Q:Perl for AS400 (OS400)
Message-Id: <3366DEC7.21C843BE@11.kblz1.telekom400.dbp.de>

Hello folks,
is there any binary distribution for the IBM AS400 (OS/400) series?
Where can I find Perl for that machine?

Thanks in advance

Gergards

Marcus


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

Date: 30 Apr 1997 09:06:11 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: question: how to trim a string passed via hard reference?
Message-Id: <5k7223$chf@pirate.shu.edu>

Hello -

brannon@bufo.usc.edu (Terrence M. Brannon) writes:


>sub trim {
>    chomp($$_[0]);
>    $$_[0] =~ s/^\s+//;
>    $$_[0] =~ s/\s+$//;
>}

>trim(\$x)

>does not trim away leading and trailing whitespace. why?

This is a case where you have to use braces to clarify the
variable expression.

This:

${$_[0]}

means: dereference the scalar reference contained in $_[0].

This:

$$_[0]

means: treat $_ as a list reference, and take the 0'th element of
the list it references.


David Black
dblack@icarus.shu.edu


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

Date: Tue, 29 Apr 1997 20:03:32 -0500
From: Good.Luck@Finding.My.Address.Com (Michael R. Bagnall)
Subject: servers/chmod and stuff
Message-Id: <Good.Luck-2904972003320001@pm3-02-dyn4-77.nash.telalink.net>

Hello!
     Ok, I'm a newbie and I know I suck. But I need help. I am begining to
do some perl programming for the web and need to know how to make it work
online. I code it, upload it to my cgi-bin directory, issue the chmod nd
am still stuck. Am I forgetting a step? Do I upload the script in the text
script format? Do I need to compile it? Help? Please?

Write me E-Mail if you like:

Chuckie@Chelseamusic.com


Michael R. Bagnall


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

Date: 30 Apr 1997 10:33:26 GMT
From: mark@zang.com (Mark (Mookie))
Subject: Solaris Software Package Archive
Message-Id: <5k775m$7pm@nuhou.aloha.net>
Keywords: solaris software package free utility GNU perl tcl X11

Hi all,

For those who are looking for Solaris pre-packaged software:

ftp://sunsite.unc.edu/pub/packages/solaris/sparc
ftp://sunsite.unc.edu/pub/packages/solaris/i86pc
http://sunsite.unc.edu/pub/packages/solaris/sparc
http://sunsite.unc.edu/pub/packages/solaris/i86pc

Included is compilers for all Solaris 2.x releases.  Also a selection of
mission critical X11 games :)

In the 00README.packages file is complete clear instructions on installing
the packages.

Cheers,
Mark
mark@sunsite.unc.edu
mark@zang.com

Here are the packages currently publically available:

SPARC:
    GNUbison.1.25.SPARC.Solaris.2.5.pkg.tgz
    GNUchess.4.0.77.SPARC.Solaris.2.5.pkg.tgz         Apr 97
    GNUg77.0.5.18.SPARC.Solaris.2.5.pkg.tgz
    GNUgcc.2.7.2.1.SPARC.Solaris.2.3.pkg.tgz          Feb 97
    GNUgcc.2.7.2.1.SPARC.Solaris.2.4.pkg.tgz          Feb 97
    GNUgcc.2.7.2.1.SPARC.Solaris.2.5.1.pkg.tgz        Feb 97
    GNUgcc.2.7.2.2.SPARC.Solaris.2.5.pkg.tgz          Feb 97
    GNUgdb.4.16.SPARC.Solaris.2.4.pkg.tgz             Mar 97
    GNUgdb.4.16.SPARC.Solaris.2.5.pkg.tgz
    GNUgdb.4.16.SPARC.Solaris.2.5.1.pkg.tgz           Mar 97
    GNUgdbm.1.7.3.SPARC.Solaris.2.3.pkg.tgz           Mar 97
    GNUgdbm.1.7.3.SPARC.Solaris.2.4.pkg.tgz           Mar 97
    GNUgdbm.1.7.3.SPARC.Solaris.2.5.pkg.tgz           Mar 97
    GNUgroff.1.10.SPARC.Solaris.2.5.pkg.tgz
    GNUindent.1.9.1.SPARC.Solaris.2.5.pkg.tgz         Mar 97
    GNUlibg++.2.7.2.SPARC.Solaris.2.5.pkg.tgz
    GNUm4.1.4.SPARC.Solaris.2.5.pkg.tgz
    GNUpatch.2.1.SPARC.Solaris.2.5.pkg.tgz
    GNUplot3.5.SPARC.Solaris.2.5.pkg.tgz
    GNUscreen.3.7.1.SPARC.Solaris.2.5.pkg.tgz
    GNUtar.1.11.8.SPARC.Solaris.2.5.pkg.tgz
    GNUtexinfo.3.7.SPARC.Solaris.2.5.pkg.tgz          Mar 97
    GNUzip.1.2.4.SPARC.Solaris.2.5.pkg.tar
    X11R6.1.SPARC.Solaris.2.5.pkg.tgz
    X11R6.3.SPARC.Solaris.2.5.pkg.tgz                 Mar 97
    X11R6.3.SPARC.Solaris.2.5.1.pkg.tgz               Mar 97
    dhcpd.3.3.7.SPARC.Solaris.2.5.pkg.tgz             Mar 97
    expect.5.20.18.SPARC.Solaris.2.5.pkg.tgz
    fvwm.2.0.40.SPARC.Solaris.2.5.pkg.tgz             Mar 97
    jpeg.6a.SPARC.Solaris.2.5.pkg.tgz                 Apr 97
    less.330.SPARC.Solaris.2.5.pkg.tgz                Mar 97
    libpng.0.89c.SPARC.Solaris.2.5.pkg.tgz            Apr 97
    md5sum.1.00.SPARC.Solaris.2.5.pkg.tgz
    metamail.2.7.SPARC.Solaris.2.5.pkg.tgz            Apr 97
    perl4.036.SPARC.Solaris.2.5.pkg.tgz
    perl5.003.SPARC.Solaris.2.3.pkg.tgz               Mar 97
    perl5.003.SPARC.Solaris.2.4.pkg.tgz               Mar 97
    perl5.003.SPARC.Solaris.2.5.pkg.tgz               Feb 97
    perl5.003.SPARC.Solaris.2.5.1.pkg.tgz             Feb 97
    qpopper.2.2.SPARC.Solaris.2.5.pkg.tgz             Apr 97
    rcs.5.7.SPARC.Solaris.2.5.pkg.tgz                 Feb 97
    rocksndiamonds.0.9b.SPARC.Solaris.2.5.pkg.tgz     Mar 97
    tcl.7.5.p1.SPARC.Solaris.2.5.pkg.tgz
    tcsh.6.06.SPARC.Solaris.2.5.pkg.tgz
    tetris.3.1.1.SPARC.Solaris.2.5.pkg.tgz            Mar 97
    tiff.3.4.b36.SPARC.Solaris.2.5.pkg.tgz            Apr 97
    tk.4.1.SPARC.Solaris.2.5.pkg.tgz
    traceroute.3.5.SPARC.Solaris.2.3.pkg.tgz          Mar 97
    traceroute.3.5.SPARC.Solaris.2.4.pkg.tgz          Mar 97
    traceroute.3.5.SPARC.Solaris.2.5.pkg.tgz
    xboard.3.5.0.SPARC.Solaris.2.5.pkg.tgz            Mar 97
    xminehunter.0.4.SPARC.Solaris.2.5.pkg.tgz         Mar 97
    xpacman.0.11.SPARC.Solaris.2.5.pkg.tgz            Mar 97
    xpaint.2.4.7.SPARC.Solaris.2.5.pkg.tgz            Apr 97
    xpm.SPARC.Solaris.2.5.pkg.tgz
    xv.3.10a.SPARC.Solaris.2.5.pkg.tgz                Apr 97
    xxgdb.1.12.SPARC.Solaris.2.5.pkg.tgz              Apr 97
    zlib.1.0.4.SPARC.Solaris.2.5.pkg.tgz              Apr 97

i86pc:
    GNUbison.1.25.i86pc.Solaris.2.5.1.pkg.tgz
    GNUgcc.2.7.2.2.i86pc.Solaris.2.5.1.pkg.tgz
    GNUgdb.4.16.i86pc.Solaris.2.5.1.pkg.tgz
    GNUgdbm.1.7.3.i86pc.Solaris.2.5.1.pkg.tgz
    GNUindent.1.9.1.i86pc.Solaris.2.5.1.pkg.tgz
    GNUlibg++.2.7.2.i86pc.Solaris.2.5.1.pkg.tgz
    GNUm4.1.4.i86pc.Solaris.2.5.1.pkg.tgz
    GNUtar.1.11.8.i86pc.Solaris.2.5.1.pkg.tgz
    GNUzip.1.2.4.i86pc.Solaris.2.5.1.pkg.tar
    expect.5.20.18.i86pc.Solaris.2.5.1.pkg.tgz
    less.290.i86pc.Solaris.2.5.1.pkg.tgz
    md5sum.1.00.i86pc.Solaris.2.5.1.pkg.tgz
    perl4.036.i86pc.Solaris.2.5.1.pkg.tgz
    perl5.003.i86pc.Solaris.2.5.1.pkg.tgz
    rcs.5.7.i86pc.Solaris.2.5.pkg.tgz
    tcl.7.5.p1.i86pc.Solaris.2.5.1.pkg.tgz
    tcsh.6.06.i86pc.Solaris.2.5.1.pkg.tgz
    tk.4.1.i86pc.Solaris.2.5.1.pkg.tgz


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

Date: 30 Apr 1997 04:55:07 GMT
From: brdavis@orion.ac.hmc.edu (Brooks Davis)
Subject: Re: split returns erroneous value on a line beginning with '#'
Message-Id: <5k6jbb$fdo$1@cinenews.claremont.edu>

Terrence M. Brannon (brannon@bufo.usc.edu) wrote:
: The following simple script
: 
: #!//usr/bin/perl
[sniped reading the command line arguments...]
: 
: while (<F>) {
:     @els = split(/\s/);
:     print $#els+1 . ": $_";
: }
: 
: indicates that the first line of the file opened (listed below) has 1
: column, even though it obviously has 6
: #P		0.000007	0.000037	0.000047	0.000057	0.000067

When I run the code it says that the first line has 7 columns in it.  The
reason for this is quite simple, but not all that hard to miss.  The argument
to split is a pattern which matches the boundries and \s matches the _two_
tabs between #P and 0.000007 independently creating the list:

('#P','','0.000007','0.000037','0.000047','0.000057','0.000067') 
      ^^
If you change the line of the split command to the following then it works
just fine for me:

@els = split(/\s+/);

Finaly, a note to those whose regular expression skills aren't all that
strong (probalby not the origional poster, but certainly some other readers):
/\s+/ has a very different effect then /\s*/ which you might think of
using if you were used to other regexp systems.  /\s*/ matches everything 
since * matches _zero_ or more instances of the previous character.

-- Brooks


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

Date: 30 Apr 1997 09:31:07 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: split returns erroneous value on a line beginning with '#'
Message-Id: <5k73gr$dgi@pirate.shu.edu>

Hello -

brdavis@orion.ac.hmc.edu (Brooks Davis) writes:

>Finaly, a note to those whose regular expression skills aren't all that
>strong (probalby not the origional poster, but certainly some other readers):
>/\s+/ has a very different effect then /\s*/ which you might think of
>using if you were used to other regexp systems.  /\s*/ matches everything 
>since * matches _zero_ or more instances of the previous character.

But "zero or more whitespace characters" isn't the same as "everything",
if "everything" includes non-whitespace characters:

$abc = "abcdefg";
$abc =~ s/\s*//;
print $abc;  # prints abcdefg

The only difference between \s+ and \s* is that the former will fail if
there are no \s characters, because it requires at least one, whereas
the second one always succeeds because it matches even if it finds zero
of the specified characters.  ("Succeeds" doesn't mean it matches
any characters, but that the pattern it specifies is found in the
string, as any zero-or-more pattern will be.)

David Black
dblack@icarus.shu.edu


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

Date: Wed, 30 Apr 1997 09:39:02 +0200
From: Christophe de Kerviler <kerviler@francenet.fr>
Subject: Waiting for complete upload ?
Message-Id: <3366F716.DFB@francenet.fr>

Someone sends me a file. Can my perl script know if this file has been
fully uploaded before opening it.
For example, if I receive a large picture in a directory, the
script should wait complete upload.

Thanks
Christophe
-- 

  Christophe de KERVILER -- kerviler@francenet.fr


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

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

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