[8839] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2456 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 29 19:07:20 1998

Date: Wed, 29 Apr 98 16:00:35 -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, 29 Apr 1998     Volume: 8 Number: 2456

Today's topics:
    Re: 1701 days hath September (was: Re: rename funciton) (I R A Aggie)
        ?? Making GD module into a DLL (Aran Clary)
    Re: a way to remove files? (Gabor)
    Re: ANSI Colour in Perl (Jonathan Stowe)
    Re: Bill Gates should be invited to O'Reilly's "Free So <dulino@ulticom.nvo.com>
    Re: Downloading binary file with Perl script (Jonathan Stowe)
        formatting output (Jeff McCreary)
    Re: Ftp.pm <aaron@soltec.net>
    Re: Ftp.pm (I R A Aggie)
    Re: Grabbing a webpage with Perl (with https) <aas@sn.no>
        Help-Perl misread Env variable 100042.2616@compuserve.com
    Re: Help-Perl misread Env variable <rootbeer@teleport.com>
        How do I upload??? <zisa@onramp.net>
    Re: How do I upload??? <rootbeer@teleport.com>
    Re: How to find the number of matches in a string <jdf@pobox.com>
    Re: How to find the number of matches in a string (Ilya Zakharevich)
    Re: How to find the number of matches in a string <rootbeer@teleport.com>
    Re: How to read command line literally? (Earl Hood)
        http://www.tres.com/perl  (Sobre Perl, en espaqol) (Juan Palacio)
    Re: Initializing hash with null array: which is best? (Bart Lateur)
    Re: instruction if-elsif-elsif insert on a for loop (Gabor)
    Re: Matts Script Archive-WWWBoard-FrontPage-Suddenly No (Richard Bellavance)
    Re: message board question <grinch@whoville.com>
    Re: NEED HELP WITH SYNTAX <sowmaster@juicepigs.com>
    Re: NEED HELP WITH SYNTAX <uri@sysarch.com>
    Re: NEED HELP WITH SYNTAX <uri@sysarch.com>
    Re: Odd Regexp Question <lr@hpl.hp.com>
    Re: perl 5.004 is better than 5.004004 ?! <captain@pirate.de.nospam-delete-this>
    Re: perl and Year 2000 (Jonathan Stowe)
    Re: Perl Editor?? (Earl Hood)
    Re: Perl for Win32 not writing to file (Jonathan Stowe)
    Re: Print Currency (Mark-Jason Dominus)
    Re: print($b=1,$b=2) (Mark-Jason Dominus)
    Re: Shared File Access Question/Problem <rootbeer@teleport.com>
    Re: Sys::syslog not working? (Marc Haber)
    Re: Text file transfers between OS's <evan@unix.worldpath.net>
        Thank you Solutionsoft (Dr. Fridemar Pache)
        Vb and Perl <rsikorsk@erols.com>
    Re: You people want Perl to be popular? (Michael J Gebis)
    Re: You people want Perl to be popular? (Craig Berry)
    Re: You people want Perl to be popular? (gaj)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 29 Apr 1998 18:10:24 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: 1701 days hath September (was: Re: rename funciton)
Message-Id: <fl_aggie-2904981810250001@aggie.coaps.fsu.edu>

In article <35477E94.477D@juicepigs.com>, Bob Trieger
<sowmaster@juicepigs.com> wrote:

+ I R A Aggie wrote:

+ > In article <354740A4.573B@juicepigs.com>, Bob Trieger
+ > <sowmaster@juicepigs.com> wrote:
 
+ > + Change happens and all you can do is enjoy it. 
+ > Even if the change is NOT beneficial?
+ YES! Perhaps the most then. It does you no good to get ulcers over
+ something that you can not keep from changing.

I believe the mantra is:

G*d, give me the strength to change things that I can,
the patience to accept the things that I can't change,
and the wisdom to know the difference.

There's another one, something to the effect of "98% of people are like
cows, they'll go where they're told. Its the 2% of people that are
important. That's why what an individual does is important."

+ > The constant September, and the providers that just dump their users
+ > out on the net without proper instruction, needs to be opposed. It improves
+ > things for everyone.

+ Harassing the poor lamers that are getting dumped onto USENET without a
+ clue is not going to help your cause. 

Hitting people's pride can be an effective means of causing change. They'll
catch a clue either because they don't like being embarrassed, or because 
they don't like me and want to prove to me that I was wrong. If enough of
'em bitch at their provider, some instruction at that point may be
forthcoming...and sold to the new customers as a "feature".

All I know is that I ain't getting paid enough to hold their hands 
and spoonfeed 'em perl.

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: Wed, 29 Apr 1998 22:32:36 GMT
From: aran@mapcruzin.com (Aran Clary)
Subject: ?? Making GD module into a DLL
Message-Id: <3547aa52.18465720@news.ucsc.edu>

Hi, I think it would be easy to compile the GD C source code into a
DLL, but since I ain't no C programmer I don't feal like doing it.  I
want to be able to save and manipulate GIFs in Visual Basic.  Or, if
anyone know of any other way than GD thats not to expensive then I'd
love to hear.  Thanks for any help.  I can't Newsgroup to often, could
you respond via e-mail?

Aran
(www.mapcruzin.com/aran/)


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

Date: 29 Apr 1998 17:35:51 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: a way to remove files?
Message-Id: <slrn6kepdl.c5d.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Tom Christiansen <tchrist@mox.perl.com> wrote :
#  [courtesy cc of this posting sent to cited author via email]
# 
# In comp.lang.perl.misc, shane michael harwood <sharwood@cs.uiowa.edu> writes:
# :is there a way from within a perl script to remove files?
# 
# I wish I knew why no one ever reads the perlfunc manpage.

Because it's too easy to do.  Most people prefer the contorted way of
asking a question in a forum where turn around time is measured in
days and you're likely to get flamed. :)  I'd rather use perlpod! ;)


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

Date: Tue, 28 Apr 1998 22:18:05 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: ANSI Colour in Perl
Message-Id: <35464dde.8727582@news.btinternet.com>

On 29 Apr 1998 18:14:50 GMT, Zenin wrote :

>
>	the correct spelling of "color" on the WAIT it should be at
>	
Ey,ey.  

That will be the North American spelling rather than the *correct*
spelling I would suggest.

/J\

Jonathan Stowe
Some of your questions answered http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Wed, 29 Apr 1998 17:56:03 -0400
From: Oleg Dulin <dulino@ulticom.nvo.com>
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <3547A1F3.AFB02B28@ulticom.nvo.com>

> I keep imagining a musical piece called Dueling Bootsectors...


Yeah... (defun question(To-be) (OR (To-be (NOT To-be))))


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

Date: Tue, 28 Apr 1998 22:18:07 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Downloading binary file with Perl script
Message-Id: <354650b1.9451054@news.btinternet.com>

On Wed, 29 Apr 1998 13:21:15 -0600, Brandon wrote :

>    I am trying to use a Perl script to download a binary file (MS Access
>database).  I do not want the location to be known, so I a trying to have
>the script deliver the file.
>    The below code seems to work for a text file, but when I try it on for a
>binary file, like my database or an image, it starts the download, but only
>puts a the a few kbytes in the file( which should be much larger).  With the
>image, it almost looks like it is downloading the very beginning of the
>file, and that's it.

If as I guess you are on a Microsoft platform then you will probably
need to set "binmode" on your input file.

/J\ 
Jonathan Stowe
Some of your questions answered http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: Wed, 29 Apr 1998 17:04:29 GMT
From: jeffmcc@mindspring.com (Jeff McCreary)
Subject: formatting output
Message-Id: <35475d72.1311265@news>

I want to take an element out of an array and print it in a currency
format.  How can I do this?

thanks


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

Date: Wed, 29 Apr 1998 17:31:09 -0500
From: "Aaron" <aaron@soltec.net>
Subject: Re: Ftp.pm
Message-Id: <6i89l3$9c$1@hirame.wwa.com>

Ahhh yes,

Thanks I'll give it a shot

Aaron
I R A Aggie wrote in message ...
>In article <6i7j9f$n0r$1@hirame.wwa.com>, "Aaron" <aaron@soltec.net> wrote:
>
>+ I have been using the FTP module for a little while now and I think it
does
>+ the job like a champ.  However, I need to be able to change the file
>+ permissions of the uploaded files and I don't see anything like a chmod
>+ command in the documentation.
>
>+ Anyone know of a way around this?
>
>From the docs:
>
>          Methods for the adventurous
>
>          Net::FTP inherits from Net::Cmd so methods defined in
>          Net::Cmd may be used to send commands to the remote FTP
>          server.
>
>          quot (CMD [,ARGS])
>              Send a command, that Net::FTP does not directly support,
>              to the remote server and wait for a response.
>
>              Returns most significant digit of the response code.
>
>              WARNING This call should only be used on commands that
>              do not require data connections. Misuse of this method
>              can hang the connection.
>
>There is no other apparent way of sending a CHMOD via Net::FTP.
>
>James
>
>--
>Consulting Minister for Consultants, DNRC
>The Bill of Rights is paid in Responsibilities - Jean McGuire
>To cure your perl CGI problems, please look at:
><url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>




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

Date: Wed, 29 Apr 1998 13:42:23 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Ftp.pm
Message-Id: <fl_aggie-2904981342230001@aggie.coaps.fsu.edu>

In article <6i7j9f$n0r$1@hirame.wwa.com>, "Aaron" <aaron@soltec.net> wrote:

+ I have been using the FTP module for a little while now and I think it does
+ the job like a champ.  However, I need to be able to change the file
+ permissions of the uploaded files and I don't see anything like a chmod
+ command in the documentation.
 
+ Anyone know of a way around this?

>From the docs:

          Methods for the adventurous

          Net::FTP inherits from Net::Cmd so methods defined in
          Net::Cmd may be used to send commands to the remote FTP
          server.

          quot (CMD [,ARGS])
              Send a command, that Net::FTP does not directly support,
              to the remote server and wait for a response.

              Returns most significant digit of the response code.

              WARNING This call should only be used on commands that
              do not require data connections. Misuse of this method
              can hang the connection.

There is no other apparent way of sending a CHMOD via Net::FTP.

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: 29 Apr 1998 19:50:37 +0200
From: Gisle Aas <aas@sn.no>
Subject: Re: Grabbing a webpage with Perl (with https)
Message-Id: <m3bttka55e.fsf@furu.g.aas.no>

"Greg Hassan" <greg@hassan.com> writes:

> Martien Verbruggen wrote in message <6i5o7t$l6s$4@comdyn.comdyn.com.au>...
> >In article <6hqb8s$nal$1@venus.mcs.net>,
> > les@MCS.COM (Leslie Mikesell) writes:
> >
> >> Is there anything free that will grab a page via https?  Or a way
> >> to control a browser that could do it?
> >
> >Again, like most other answers in this thread: LWP will do that.
> 
> 
> I don't believe lwp handles talking with secure servers.   Please
> correct me and maybe post a sample if I am incorrect.

How about:

   use LWP::Simple;
   $doc = get "https://shop.sol.no/" || die;

> In order to actually do something like that, you would need to
> get the code from a browser that can do secure transactions,
> maybe netscape, so that you can figure out the encryption bit.

We use SSLeay for that.

-- 
Gisle Aas


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

Date: Wed, 29 Apr 1998 16:55:47 -0600
From: 100042.2616@compuserve.com
Subject: Help-Perl misread Env variable
Message-Id: <6i87l3$973$1@nnrp1.dejanews.com>

When I used $ENV to obtain the value of an environment variable, the value
came back corrupted. Well, the English text came back fine. But I have a few
bytes non alphabetic text and they came back wrong. Any idea why? The
program has just three lines:

#!f:\perl
# environmetal variable was first set to QUERY_STRING=abc<FKc;zdef
{
  print "Environmetal variable was set to QUERY_STRING=abc<FKc;zdef\n";
  print "Data obtained through Env=";
  print $ENV{'QUERY_STRING'};
}

  ----------  the output -----------
Environmetal variable was set to QUERY_STRING=abc<FKc;zdef
Data obtained through Env=abc,Ea/#def

The alphabetic letters "abc" and "def" came throug, but "<FKc;z" become
",Ea/#". Seems Perl used some kind of translation. How can I disable the
translation?
I am using Win 95, Perl for Win32, Build 316 - Mar 13, 1998
from ActiveStates(ActiveWare)

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


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

Date: Wed, 29 Apr 1998 22:42:20 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: 100042.2616@compuserve.com
Subject: Re: Help-Perl misread Env variable
Message-Id: <Pine.GSO.3.96.980429153354.2153B-100000@user2.teleport.com>

On Wed, 29 Apr 1998 100042.2616@compuserve.com wrote:

> When I used $ENV 

You mean %ENV, of course. 

> to obtain the value of an environment variable, the value came back
> corrupted.

Are you sure? You could be right, but that doesn't seem likely. How can
you be sure that it was set to the right value in the first place?

> Well, the English text came back fine. But I have a few
> bytes non alphabetic text and they came back wrong. Any idea why? 

Maybe the variable was mis-set or encoded in some way by the calling
program. 

> Seems Perl used some kind of translation. How can I disable the
> translation?

Perl doesn't secretly tamper with the environment variables! :-) If it
says that the variable contains a certain string, then that's what it
contains. If the value is not what you want, check the documentation for
the program which set the variable; web servers and browsers often encode
data, and that may account for what you're seeing. Of course, if your
question is about what a browser or server is doing, you'll want to
check with its docs, or a newsgroup about that other software.

Hope this helps!

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



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

Date: Wed, 29 Apr 1998 15:49:25 -0600
From: Zisa <zisa@onramp.net>
Subject: How do I upload???
Message-Id: <3547A062.D328BB5@onramp.net>

How do I upload Perl Scripts after they are made and ready?

Please help me!

Zisa (Long "i")




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

Date: Wed, 29 Apr 1998 22:46:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: zisa@ns.onramp.net
Subject: Re: How do I upload???
Message-Id: <Pine.GSO.3.96.980429154233.2153C-100000@user2.teleport.com>

On Wed, 29 Apr 1998, Zisa wrote:

> How do I upload Perl Scripts after they are made and ready?

You typically use a program which implements a file-transferring protocol
which is available on the target machine. (Of course, this is the same way
that you upload non-Perl scripts, so there's nothing Perl-specific about
this question.) There are many protocols available, though, and we have no
way of knowing which ones are available on your target machine. But if
you're not sure how to do this for your site, your system administrator or
local expert should be able to help you out. Good luck! 

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



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

Date: 29 Apr 1998 12:49:45 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: How to find the number of matches in a string
Message-Id: <hg3cldqe.fsf@mailhost.panix.com>

cberry@cinenet.net (Craig Berry) writes:

> Mark-Jason Dominus (mjd@op.net) wrote:
> : 	$count++ while $string =~ m/pattern/g;
> 
> Easier: $count = () = $string =~ m/pattern/g;

"Easier?"  By what metric?  It's one character shorter, I'll grant you
that.  But MJD's has the advantage of not building a temporary list.

Hey, let's benchmark!

   #!//c/perl/bin/perl -w
   use Benchmark;

   my $s = q(Jonathan, Jonathan, there's something we want to know.);

   sub mjd { my $count; $count++ while $s =~ m/an/g; }
   sub easier { my $count; $count = () = $s =~ m/an/g; }

   timethese ( 50000, {
		       'MJD' => \&mjd,
		       'EASIER' => \&easier,
		      });
   __END__

   Benchmark: timing 50000 iterations of EASIER, MJD...
       EASIER:  2 secs ( 1.51 usr  0.00 sys =  1.51 cpu)
	  MJD:  1 secs ( 0.90 usr  0.00 sys =  0.90 cpu)

Can anyone say definitively why MJD's method is faster?

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: 29 Apr 1998 20:34:44 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: How to find the number of matches in a string
Message-Id: <6i82t4$koc$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Jonathan Feinberg 
<jdf@pobox.com>],
who wrote in article <hg3cldqe.fsf@mailhost.panix.com>:
>    sub mjd { my $count; $count++ while $s =~ m/an/g; }
>    sub easier { my $count; $count = () = $s =~ m/an/g; }

> Can anyone say definitively why MJD's method is faster?

Hmm, did not you see "defend Perl" thread?  Perl is incredibly slow.
Perl ops are incredibly fast.  

The first way is doing some operations in Perl.  The second one is
doing all the work inside one op.

Ilya


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

Date: Wed, 29 Apr 1998 17:34:12 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Craig Berry <cberry@cinenet.net>
Subject: Re: How to find the number of matches in a string
Message-Id: <Pine.GSO.3.96.980429102329.19984A-100000@user2.teleport.com>

On 29 Apr 1998, Craig Berry wrote:

> Mark-Jason Dominus (mjd@op.net) wrote:
> : In article <35471A44.19F3@cse.bridgeport.edu>,
> : Seong Y. Kim <seong@cse.bridgeport.edu> wrote:
> : >I want my program able to tell me the number of matches within a string.
> : 
> : 	$count++ while $string =~ m/pattern/g;
> 
> Easier: $count = () = $string =~ m/pattern/g;
> 
> The list context on the right-hand assignment causes m//g to return a 
> list of all matches, and the scalar left-hand assignment then transforms 
> this into the length of the list of matches.

Relative merits of these two methods notwithstanding, these will not
actually report _all_ matches; they report only the number of
_nonoverlapping_ matches. A quibble, perhaps.

    my $string = 'alfalfa';
    my($count1, $count2);
    $count1++ while $string =~ m/alfa/g;
    $count2++ while $string =~ m/(?=alfa)/g;
    print "$count1 or $count2 matches, your choice\n";

Hope this helps!

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



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

Date: 29 Apr 1998 22:16:44 GMT
From: ehood@medusa.acs.uci.edu (Earl Hood)
Subject: Re: How to read command line literally?
Message-Id: <6i88sc$ht2@news.service.uci.edu>

In article <slrn6kd0pb.lhf.jgloudon@hyssop.bbn.com>,
Jason Gloudon <jgloudon@bbn.com> wrote:

>That aside, if file globbing is a nuisance, you can
>bypass the shell or use a shell that doesn't do globbing (though i don't know of
>one).

csh and tcsh.  If you do not want globbing, then just use:

    set noglob

Turn it back on:

    unset noglob


--ewh
-- 
             Earl Hood              | University of California: Irvine
      ehood@medusa.acs.uci.edu      |      Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME


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

Date: Wed, 29 Apr 1998 17:53:53 GMT
From: jpalacio@tres.com (Juan Palacio)
Subject: http://www.tres.com/perl  (Sobre Perl, en espaqol)
Message-Id: <354768da.965548@noticias.ibernet.es>


Nueva pagina sobre Perl
http://www.tres.com/perl


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

Date: Wed, 29 Apr 1998 17:14:58 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Initializing hash with null array: which is best?
Message-Id: <35485f2b.29292710@news.tornado.be>

Zenin wrote:

>	BTW, when you CC people your followups, it's nice to mention
>	it at least in the email so one doesn't waste time replying
>	twice (see above).  Thanks.

Consider yourself warned. ;-)

Can't you just keep the message you send, with some copy/paste you can
easily create a newsgroup post as well.

	Bart.


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

Date: 29 Apr 1998 17:07:37 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: instruction if-elsif-elsif insert on a for loop
Message-Id: <slrn6kenon.c5d.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Stiphanie gaye <info@atig.fr> wrote :
# hello!
# 
# is it possible to insert an instruction if-elsif-elsif in a "for" loop?
# example :
# for( ; ; ){
# if ( ){ };
# elsif ( ) { };
# elsif ( ) { };
# }

Yes, why didn't you at least try it before you posted. ;)


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

Date: 29 Apr 1998 12:22:20 -0400
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: Matts Script Archive-WWWBoard-FrontPage-Suddenly Not Working
Message-Id: <6i7k3s$d5q@ocean.CAM.ORG>

In article <6i5vig$7cs@fridge.shore.net>, Grinch <grinch@whoville.com> wrote:
>
>In general, if you're using FrontPage, you can expect it to randomly stomp
>all over your site and do pretty much what it darn well pleases to files
>that don't belong to it.
>

Typical M$-app behaviour, isn't it ?

>Your best bet, aside from getting rid of FP altogether, is to use the
>discussion form 'bot that comes with it. That'll be a lot easier than
>convincing it to work with the rest of the world.
>

The *ONLY* solution is to get rid of FP...  Do you really think that the
existing system should be trashed and replaced with an M$ version, just
for one to use a site manager that can't behave in the first place ?  With
that sort of logic, no wonder M$ is in such a dominant position.  "Gee,
that new M$ app doesn't work with our existing system.  Let's scrap it
and replace it with an M$ system !"   Give me a fucking break !!!

Richard, not saying that FP is the culprit in this case, though...
-- 
Richard Bellavance            |
                              |  "Rien n'est plus imminent que l'impossible."
charlot@cam.org               |        - Victor Hugo
http://www.cam.org/~charlot/  |



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

Date: Wed, 29 Apr 1998 13:24:03 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: message board question
Message-Id: <6i7nc4$oje@fridge.shore.net>

Matthew Wheeler wrote in message <3546D1BA.5ECABC3C@idkconsulting.com>...

>I didn't want to waste time reading about newsgroups when I knew I'd only
be
>here a day or two.

Pardon my French, but what a load of arrogant crap. What the fuck makes you
think you can walk in here and simply demand instant help, while ignoring
the group's local customs and practices?

If you'd read the instructions provided to you, you'd have learned where and
how to obtain more help than you'd ever need. By ignoring them, you've
accomplished nothing except pissing people off. Better luck next time.

>As for your response, I've already read those guides.  They didn't help.

I find that _incredibly_ difficult to believe.

Did you spend a couple of weekends studying them and trying to learn
something? Or, did you expect them to tell you exactly what to type and
where, and give up after an hour? Like this newsgroup, they're there to help
you learn Perl, not to do your work for you.

-grinch


--
-----
"Yes, I'm paranoid, but that doesn't mean
no one's out to get me." - me

Sherm Pendley
grinch@whoville.com
http://www.whoville.com





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

Date: Wed, 29 Apr 1998 18:07:40 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
To: Teodoro Cipresso <tcipress@niu.edu>
Subject: Re: NEED HELP WITH SYNTAX
Message-Id: <3547A4AC.74C@juicepigs.com>

Teodoro Cipresso wrote:
> 
> descrip1 and descrip2 are the input names for textboxes on my website
> I'm getting an error when I use the following if statements to check
> if the boxes are empty.
> 
> Can anyone help me with the syntax? I got these if statments to work
> with
> list boxes but I get an error with text boxes.
> 
> if ($in{'descrip1'} eq "" && $CHECK ==1) {
>        $MIS8='You Forgot To Fill Out The Problem Description Box';
>         $pderror='y'; error='y';}

If no data was entered into the textbox, then none is returned and the
key is not defined. Your if statement is looking for a defined key that
is empty.

There are many ways to do what you are trying. Here is the way I'd do
it:

if (!$in{'descrip1'} && $CHECK ==1) 


HTH
-- 
Bob Trieger               |  Titanic: big boat, bigger
sowmaster@juicepigs.com   |           iceberg, big deal


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

Date: 29 Apr 1998 18:49:14 -0400
From: Uri Guttman <uri@sysarch.com>
To: Teodoro Cipresso <tcipress@niu.edu>
Subject: Re: NEED HELP WITH SYNTAX
Message-Id: <x71zugckgl.fsf@sysarch.com>

>>>>> "TC" == Teodoro Cipresso <tcipress@niu.edu> writes:

  TC> descrip1 and descrip2 are the input names for textboxes on my
  TC> website I'm getting an error when I use the following if
  TC> statements to check if the boxes are empty.

  TC> Can anyone help me with the syntax? I got these if statments to
  TC> work with list boxes but I get an error with text boxes.

  TC> :-)

  TC> tcipress@niu.edu


  TC> if ($in{'descrip1'} eq "" && $CHECK ==1) { $MIS8='You Forgot To
  TC> Fill Out The Problem Description Box'; $pderror='y'; error='y';}

  TC> if ($in{'descrip2'} eq "" && $CHECK ==1) { $MIS9='You Forgot To
  TC> Fill Out The Problem Symptoms Box'; $pserror='y'; error='y';}


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


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

Date: 29 Apr 1998 18:52:17 -0400
From: Uri Guttman <uri@sysarch.com>
To: Teodoro Cipresso <tcipress@niu.edu>
Subject: Re: NEED HELP WITH SYNTAX
Message-Id: <x7yawob5r2.fsf@sysarch.com>

>>>>> "TC" == Teodoro Cipresso <tcipress@niu.edu> writes:

  TC> if ($in{'descrip1'} eq "" && $CHECK ==1) {
  TC>        $MIS8='You Forgot To Fill Out The Problem Description Box';
  TC>         $pderror='y'; error='y';}
                            ^
                            missing $

  TC> if ($in{'descrip2'} eq "" && $CHECK ==1) {
  TC>        $MIS9='You Forgot To Fill Out The Problem Symptoms Box';
  TC>         $pserror='y'; error='y';}
                            ^
                            missing $


also you should not use all upper case in variable names, it is pood
perl style. and you should clean up your formatting a little, it would
help to find errors like this if the statements were on there own lines.

and don't use all caps in subjects. you obviously can type lower case so
don't shout at usenet.

hth,

uri

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


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

Date: Wed, 29 Apr 1998 10:21:49 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Odd Regexp Question
Message-Id: <6i7njd$qlg@hplntx.hpl.hp.com>

Michael Poliakov wrote in message <354909b4.22316698@news.inforis.ru>...
>On 28 Apr 1998 11:50:59 -0500, Jonathan Feinberg <jdf@pobox.com> wrote:
>
>>> Any thoughts on how to achieve this? Can I do something
>>> like:
>>>
>>> ($number_2) = /(\d{6})([^\-]|$)/
>>>
>>  you could use a zero-width lookahead assertion (instead of a
>>  capture)
>>
>>      ($foo) = /(\d{6})(?=[^-]|$)/;
>>
>
>I suspect the correct way is
>
>      ($foo) =~ /(\d{6})(?=[^-]|$)/;
>             ^^^
>
>Michael Poliakov, Nizhny Novgorod, Russia

No.  The first way stores into $foo the first six-digit sequence in $_
that is followed by a character that is not a '-' or by nothing.  Your
way captures the similar first six-digit sequence in $foo, then does
nothing with it.  The parentheses around $foo are irrelevant.

--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com





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

Date: Wed, 29 Apr 1998 18:50:37 +0200
From: Mark Seuffert <captain@pirate.de.nospam-delete-this>
Subject: Re: perl 5.004 is better than 5.004004 ?!
Message-Id: <35475A5D.50A0@pirate.de.nospam-delete-this>

Mark Seuffert wrote:

here is the solution of my prob.... I used:
> Linux 2.0.29 on a 486DX/33 with 16 MB RAM,

Now I have done a update of my linux system, 
new Suse 5.2 distribution, Kernel 2.0.33, it works.....

-- 

/Mark (EMailadresse ab ".nospam" lvschen)
http://home.pages.de/~irc ~html ~unix


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

Date: Tue, 28 Apr 1998 22:18:09 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: perl and Year 2000
Message-Id: <3546529f.9944500@news.btinternet.com>

On Wed, 29 Apr 1998 15:16:09 -0400, Shawn Abigail wrote :

>Hi,
>
>I am using perl 5.004 as a tool on my workstation. My boss wants to know
>if it is Year 2000 compliant.  What do I tell her?  I haven't seen
>anything on the web about this.  Assuming that my operating system is
>compliant, are there any Y2K issues with perl?  Thanks!
>
You might want to check out Tom Christiansen's article at

http://language.perl.com/news/y2k.html

(A caveat though: I sent a link to it to the manager at my work
charged with overseeing the century audit and she took it to mean that
Perl *did* have a problem until I summarized the pertinent parts.)

There have been a number of threads in this group in recent months on
this subject which might be worth looking for in DejaNews to glean a
variety of opinion.

/J\
Jonathan Stowe
Some of your questions answered http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: 29 Apr 1998 22:09:22 GMT
From: ehood@medusa.acs.uci.edu (Earl Hood)
Subject: Re: Perl Editor??
Message-Id: <6i88ei$hn3@news.service.uci.edu>

In article <35465F5C.89D0B3E4@order.booktraders.com>,
Birgitt Funk  <birgitt@order.booktraders.com> wrote:

>As I want to learn Perl (and as I am new to vi - and as I remember 
>that not only Abigail said a couple of days/weeks ago that all you 
>need to know is your vi - and as I know at least one other Perl expert
>who swears on vim for everything -  and as I am using vi, but for
>now just the basics), can someone tell me if I can find out about how 
>to set vi up to use for Perl code specifically by just reading the
>vi documentation or is there some other place which would have more
>details and tips specifically for what I am looking for. 

Regular vi does not have any special mode for Perl.  Vi has no special
mode for any language (except Lisp -- provides auto indenting
formatting).

For regular vi, this does it for any language I program for:

    :set ai redraw sm showmode ic ts=8 sw=4

(this is in my .exrc)

Now, what you can do is utilize vi's macro capabilities to provide
stuff like auto-creating programming (stub) constructs and invoking
perl to check syntax.

Knowing vi gives you the advantage that is standard on every Unix
system.  Plus it is light-weight (system resource-wise) compared to
other editors (ed/ex excluded).

BTW, vim is a superset of vi.  If you have access to vim, it is worth
a look.  One can even get/build vim for Windog systems.

	--ewh
-- 
             Earl Hood              | University of California: Irvine
      ehood@medusa.acs.uci.edu      |      Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME


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

Date: Tue, 28 Apr 1998 22:18:01 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Perl for Win32 not writing to file
Message-Id: <35464452.6283859@news.btinternet.com>

On Wed, 29 Apr 1998 10:52:13 -0300, Gilberto Mautner wrote :

<snip>

>use CGI;
>$query = new CGI;
>$SAIDA = ">>OUTPUT2.TXT";
>open(SAIDA);

Aieee.  I think you might want:
open(SAIDA,$SAIDA) || die "Cant open the file - $!";

>@list = ('Teste');
>print SAIDA @list ;
>print $query->header;
>print $query->start_html("Resposta");
>print $query->endform;
>print "<P>Esta e a resposta</P>\n";
>print $query->end_html;
>
/J\
Jonathan Stowe
Some of your questions answered http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm


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

Date: 29 Apr 1998 18:23:43 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Print Currency
Message-Id: <6i899f$96r$1@monet.op.net>
Keywords: cesium refusal sequent strychnine

In article <_dH11.18$al1.225794@newsread.com>,
John Porter <jdporter@min.net> wrote:
>I think M-J *should* predefine
>for very commonly used cases.

Why?

The only benefit I see is that you get to write

	use Interpolation len => 'length';

instead of

	use Interpolation len => sub { length $_[0] };

which is a net savings of 12 characters.

If you really want it, well, you have the source code, and the
`builtin' array is right there, suitable for editing.


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

Date: 29 Apr 1998 18:35:33 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: print($b=1,$b=2)
Message-Id: <6i89vl$993$1@monet.op.net>
Keywords: adjutant ascend concise thud


In article <87d8e0pt2u.fsf@bj2-64.rh.uchicago.edu>,
Peter A Fein  <p-fein@uchicago.edu> wrote:
>What I think you're
>looking for is 
>
>print ($b = "basename"), ($b = "directory/$b");

I'm so sorry, that's incorrect.  Thank you for playing!

	Zooop!  

	CRUNCH.  

	Grind grind grind grind grind.

Who's our next contestant?



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

Date: Wed, 29 Apr 1998 17:37:47 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: John Ackermann <john.ackermann@daytonOH.ncr.com>
Subject: Re: Shared File Access Question/Problem
Message-Id: <Pine.GSO.3.96.980429103629.19984B-100000@user2.teleport.com>

On Wed, 29 Apr 1998, John Ackermann wrote:

> I need to be able to trim the size of the spool file every few hours by
> removing the oldest (i.e., the first) entries.  Actually, I could
> completely zero the file as the remote host that provides the original
> data does some spooling of its own.  But I need to do this in a way that
> doesn't disrupt the server processes that may have the file open in read
> mode. 

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

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



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

Date: Wed, 29 Apr 1998 17:02:19 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Sys::syslog not working?
Message-Id: <6i7mgf$mlv$4@nz12.rz.uni-karlsruhe.de>

Calle Dybedahl <qdtcall@esb.ericsson.se> wrote:
>Marc.Haber-usenet@gmx.de (Marc Haber) writes:
>> I am trying to have a perl script log something on the syslog on a
>> Linux box. I am using the example from the Camel book. That program
>> does: nothing. There is nothing being logged to syslog. syslog.ph is
>> present on the system.
>
>You have set up syslog on your machine to log entries of severity
>info, haven't you? If you haven't, syslogd is just throwing away what
>you send to it.

/etc/syslog.conf
*.*	/dev/tty10
*.*	/var/log/messages

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Wed, 29 Apr 1998 17:45:24 -0400
From: Evan Lawrence <evan@unix.worldpath.net>
To: Mark Schwartz <mcs@in.net>
Subject: Re: Text file transfers between OS's
Message-Id: <Pine.GSO.3.95.980429173153.20452B-100000@unix.worldpath.net>

Different operating systems store newlines in different ways, so this may
be what's causing your problem... On DOS/Win systems, newlines are stored
as CR/LF, on Macs they're stored as CR and on Linux/UNIX boxes they're
stored as LF. HTML doesn't care about the newlines - you could write
everything on one line if you wanted - but it's possible perl's a little
more sensitive about that kind of thing... I wrote a quick script which
I've pasted below that converts the unix format to the DOS format (please
excuse the most likely ugly way I've done things, I'm quite new to perl)
so you get the basic idea - should be easy to modify to do dos->unix...
Hope this helps.

-- Cut Here --

#!perl

use strict;

my $newline = "\n";
my $crlf = "\r\n";

my ($file1, $file2) = @ARGV;

print "Command syntax: unix2dos <file to read from> <file to write to>\n"

if (!$file1 || !$file2) {
print "Command syntax: unix2dos <file to read from> <file to write to>\n";
}

open (FILE1, $file1) or die "Couldn't open input file.\n";
open (FILE2, ">$file2") or die "Couldn't open output file.\n";

while(<FILE1>) {
        s/$newline/$crlf/;
        print (FILE2 "$_");
}


-- Stop Cutting --


--
Evan Lawrence

On Tue, 28 Apr 1998, Mark Schwartz wrote:

> About a year ago I encountered the following problem.  While teaching
> myself Perl,
> I copied a script from a CDROM onto my Linux box.  The script refused to
> run.
> When I manually typed the exact (*very* small) script, it ran fine.
> Rather then figure
> out why that happened, I used the experience to force myself to learn
> how to use vi,
> which I needed to do anyway.
> 
> I have since developed an entire Web site for my employer using
> Linux/Apache/Perl5.
> *Everything works*
> 
> My employer wants me to get everything running under NetWare 4.11/Novell
> Web Server 3.1.
> (Don't ask :-(
> 
> I mounted a DOS formatted floppy and copied all my Perl scripts and
> HTML.  I then copied
> everything onto the NetWare server in the office.  The straight HTML
> works fine, but
> the scripts keep erroring out.  After lengthy, fruitless discussions
> with Novell Tech Support,
> I decided to type, from scratch, using EDIT.COM, one of the scripts.  As
> soon I did that,
> the script worked flawlessly.
> 
> Since I am not inclined to re-type 40 odd pages of scripts all over,
> could someone please tell
> me is there some procedure, or flag/switch that I need to toggle when
> copying text files over
> to a DOS floppy under Linux.  Novell opened the file under a 'real' text
> editor which displays
> hidden characters, etc.  and it showed nothing.  But when they re-typed
> it from scratch, it ran
> for them as well.  I have tried opening and re-saving the copied files
> under two different text
> editors, but to no avail.
> 
> Thanks.
> 
> Sincerely,
> 
> Mark Schwartz
> mcs@in.net
> 
> 
> 



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

Date: Wed, 29 Apr 1998 21:22:55 GMT
From: dr.pc@t-online.de (Dr. Fridemar Pache)
Subject: Thank you Solutionsoft
Message-Id: <6i85ae$6ku$1@rznews.rrze.uni-erlangen.de>

To marty@solutionsoft.com
Re:  ANNOUNCE: Perl Builder IDE Now Available

Thank you Marty,
just got your email (attached with the Perl IDE I suppose),
As I've never dared to open a binary {{un}secure} email-attachment, I
hesitate to open this marvel. Do you or other readers know a save
procedure to overcome this.
Best wishes
Fridemar



Solutionsoft wrote:

>
> Sorry you are still having problems. 
>
> I have attached the file to this message; I hope that helps.
>
> Thanks,
>
> Marty




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

Date: Wed, 29 Apr 1998 12:59:04 -0400
From: "Robert Sikorski, MD, PhD" <rsikorsk@erols.com>
Subject: Vb and Perl
Message-Id: <35475C58.8C94726F@erols.com>

How can I control Perl on Win32 with a Visual Basic front end?

Bob



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

Date: 29 Apr 1998 16:56:29 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: You people want Perl to be popular?
Message-Id: <6i7m3t$n6b@mozo.cc.purdue.edu>

Chris Lambrou <archive@cglis.com> writes:

>Well?

That reminds me:

> -- Forwarded mail --

>     There are a bunch of people voting for perl
> for People magazines most beautiful person award.  He is already in 9th
> place!!! Ahead of the likes of Brad Pitt and Madonna!!!  It will be so
> hilarious if he wins.  Yes this is an actual person who is actually a
> computer language.  So please go to
> http://www.pathfinder.com/people/50most/1998/vote/index.html and vote
> for perl    Be sure to type the name in
> EXACTLY, spaces, commas, and all, so it will count. He has 1304 votes at
> the time I am writing this message.  Matt Damon, who is in front of him
> has 1471, and the first place Leo DiCaprio has 4222.  So come on
> people!  We need a massive movement so perl can
> be recognized for the beauty that he truly is.

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


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

Date: 29 Apr 1998 20:55:51 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: You people want Perl to be popular?
Message-Id: <6i844n$e68$1@marina.cinenet.net>

I R A Aggie (fl_aggie@thepentagon.com) wrote:
: In article <1d88t75.16la9373easowN@slip166-72-108-69.ny.us.ibm.net>,
: kpreid@ibm.net (Kevin Reid) wrote:
: + "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print> wrote: 
: + > We want Perl to be useful. Popularity ain't all it's cracked up to be.
: 
: + Being popular helps it be useful, because more people would be writing
: + scripts, modules, etc...
: 
: So, you're saying that Mac's aren't terribly useful and Wintels are 
: overwhelmingly userful? You do realize that is the implication, yes?

Well, yes, actually.  In a vacuum, viewed as isolated systems, a Mac may
well be technically superior to a Wintel in several ways.  However, the
vastly higher number of Wintels deployed *does* make a Wintel more useful. 

If I generate a document, program, or the like on a Wintel box, I can
easily share it with the vast majority of computer users; if I do so on a
Mac, there's a conversion hurdle to be crossed before I can do that.  If I
need an app that does some job, the odds of my finding one are much higher
for a Wintel box. 

It's a sad fact that the market does have a role in determining what
becomes 'standard', and that being 'standard' in turn makes a device more
useful.  If you design a stupendously superior superconducting extension
cord, it will generate zero sales if it doesn't fit a standard power
outlet. 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 29 Apr 1998 17:08:34 GMT
From: gjandl@rf.mnschoolbiz.com (gaj)
Subject: Re: You people want Perl to be popular?
Message-Id: <35475de3.160898076@news.spacestar.net>

On Tue, 28 Apr 1998 22:45:41 -0400, Chris Lambrou <archive@cglis.com>
wrote:

>Well?
>

Only if it becomes so because of it's merits. I personally don't worry
about how 'popular' a tool is. I worry about how 'usefull' it is.
Perl, IMNHSO, is quite usefull. That it's also the most fun, natural,
powerful and just plain *good* is gravy. Mmmmm! I *love* gravy!


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

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

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