[11456] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5056 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 4 17:07:38 1999

Date: Thu, 4 Mar 99 14:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 4 Mar 1999     Volume: 8 Number: 5056

Today's topics:
    Re: Beginning Perl Programmer <camerond@mail.uca.edu>
    Re: big file of user info vs many individual files (Bart Lateur)
    Re: breaks vs. last  (and $^W ???) (Tad McClellan)
    Re: date (week number) sariq@texas.net
        FAQ 1.1: What is Perl?   <perlfaq-suggestions@perl.com>
        getting 4 digit years <bmcbride@bmcbride.access.one.net>
    Re: getting 4 digit years <Allan@due.net>
    Re: getting 4 digit years <jglascoe@giss.nasa.gov>
    Re: getting 4 digit years <jeromeo@atrieva.com>
        Getting rid of ^M (Robert Saunders)
        help using system() cindy_conway@my-dejanews.com
    Re: Help with Perl CGI script type conversion dturley@pobox.com
    Re: HELP with type conversion in Perl <jglascoe@giss.nasa.gov>
        How to do a Case-insensitive Sort? <Eric@PAInternetServices.com>
    Re: How to do a Case-insensitive Sort? <Allan@due.net>
    Re: How to do a Case-insensitive Sort? <jglascoe@giss.nasa.gov>
        Howto build perl 5.005_02 & modules using VC++ on Win95 <soup@ampersand.com>
        Image upload nabil@umit.maine.edu
    Re: Load an array from a file. (Bart Lateur)
    Re: MS Excel to HTML converter? <boris.petrovic@pu.tel.hr>
        Perl interface with yppasswd <brett@amcu-tx.sps.mot.com>
    Re: procmail-ish mail handler in perl? <revjack@radix.net>
        Regex example from Camel book <bwebb@fred.net>
        scripting image conversions? rg3@iname.com
    Re: scripting image conversions? <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Undef subr &Treader::get called ??? (Bart Lateur)
    Re: URGENT! Where Do You Hide The CGI Cards From The Sp (Bart Lateur)
    Re: URGENT! Where Do You Hide The CGI Cards From The Sp (Larry Rosler)
    Re: y2k and 4-digit dates (was Re: foreach and while) (Bart Lateur)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 04 Mar 1999 14:29:21 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Beginning Perl Programmer
Message-Id: <36DEED21.38450910@mail.uca.edu>

Larry Rosler wrote:
> 
> [snip]
> Get thee to
> 
> <URL:http://www.activestate.com/>
> 
> look for ActivePerl, and have fun.  You won't get the source code
> (unless you insist, I guess).  You will get easy-to-install binaries and
> documentation, and excellent support.

The link to the source code is right there, under the link to the
binaries. Shouldn't be _too_ hard to find.

Cameron
camerond@mail.uca.edu


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

Date: Thu, 04 Mar 1999 20:21:30 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: big file of user info vs many individual files
Message-Id: <36e0ea76.749506@news.skynet.be>

23_skidoo wrote:

>when i recently downloaded a demo version of the ultimate bulletin
>board, i saw that this script stores data by creating a separate file
>for each user in a users directory.

>my question is, are there any disadvantages to doing this? 

Several.

A: you waste a LOT of disk space per file. If, for example, this one
disk uses sector sizes of 32k, you'll waste 32k PER USER. That's 1Mb per
30 users.

B: Speed. With a lot of files, disk access, in particular opening files,
gets much slower. I can remember that some scripts ran several times
slower when the number of files in the directory got over 100 or so. I
Don't remember the exact technicalities, but it probably was on a
Solaris file server.

	Bart.


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

Date: Thu, 4 Mar 1999 06:24:55 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: breaks vs. last  (and $^W ???)
Message-Id: <7iqlb7.3vh.ln@magna.metronet.com>

Jim Matzdorff (syran@best.com) wrote:

: On a completely unrelated topic that hopefully someone will read...
                  ^^^^^^^^^^^^^^^

   Then you should have made a new post with a different
   Subject header.


: I am getting a warning that states "Unquoted string "fname" may
: clash....." -- 


   So then you went and read the description of the message in
   'perldiag.pod' where all of the messages that perl might
   issue are explained.

-------------------------
=item Unquoted string "%s" may clash with future reserved word

(W) You used a bareword that might someday be claimed as a reserved word.
It's best to put such a word in quotes, or capitalize it somehow, or insert
an underbar into it.  You might also declare it as a subroutine.
-------------------------


   Is there some part of that that you are unclear about?



   The warning is issued because if 'fname' becomes a Perl keyword
   in v6.0, then this working program will *stop working*.

   The convention is to use UPPER CASE filehandles, then your
   working program will never stop working (because Larry promises
   to never use upper case keywords).


   
: "fname" is an argument to close (ie: close (fname)).
: My first question is why is it saying this?  It's a file handle.


   So then it must also appear in an open() in addition to the close()?

   You are getting a warning there too?


: Although I can guess that at the time it gets to this part, it doesn't
: know it's a file handle.  SO, therefore, I figure I would turn off
: warnings.


   You figure wrong.

   Only *experts* should turn off warnings.

   This is a warning that you should pay attention to. perl is
   trying to save you some future heartbreak.

   Listen to perl, it is exceedingly clever...


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


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

Date: Thu, 04 Mar 1999 21:33:54 GMT
From: sariq@texas.net
Subject: Re: date (week number)
Message-Id: <7bmu82$4ll$1@nnrp1.dejanews.com>

In article <36dd8d2d.1854504@news.online.ee>,
  cim@online.ee (Cim) wrote:
> I need to get current week's number (week 9 currently). It can be from
> the beginning of current year or from EPOCH. I have a separate data
> for each week and i need to display that data according to current
> week, next week and the one after that.
> Any ideas. Can localtime alone and/or special math help me. Any
> modules that could do it.
>
> thanks.
>

Others have given much more verbose answers, but I don't know what's wrong
with:

perlfaq4:

How do I find the week-of-the-year/day-of-the-year?

Perhaps someone will enlighten me?

- Tom

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


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

Date: 4 Mar 1999 14:30:44 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 1.1: What is Perl?  
Message-Id: <36defb84@csnews>

(This excerpt from perlfaq1 - General Questions About Perl 
    ($Revision: 1.21 $, $Date: 1999/01/26 09:55:05 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq1.html
if your negligent system adminstrator has been remiss in his duties.)

  What is Perl?

    Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast
    of thousands. It derives from the ubiquitous C programming language and to a lesser extent from sed,
    awk, the Unix shell, and at least a dozen other tools and languages. Perl's process, file, and text
    manipulation facilities make it particularly well-suited for tasks involving quick prototyping,
    system utilities, software tools, system management tasks, database access, graphical programming,
    networking, and world wide web programming. These strengths make it especially popular with system
    administrators and CGI script authors, but mathematicians, geneticists, journalists, and even
    managers also use Perl. Maybe you should, too.

-- 
"Of course, someone who knows more about this will correct me if I'm wrong,
 and someone who knows less will correct me if I'm right."
	--David Palmer (palmer@tybalt.caltech.edu)


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

Date: Thu, 04 Mar 1999 15:37:24 -0500
From: Brad McBride <bmcbride@bmcbride.access.one.net>
Subject: getting 4 digit years
Message-Id: <36DEEF03.C05FF9DB@bmcbride.access.one.net>

I'm trying to get Perl to return 4 digit years instead of 2 in order to
deal with Y2k issues, and am having no luck. I am trying to pull the
time from the system and using the localtime() function, but both return
the year as 2 digit. How do I get Perl to return the date with a 4 digit
year.

Brad



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

Date: Thu, 4 Mar 1999 15:59:42 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: getting 4 digit years
Message-Id: <7bmrrq$9sf$1@samsara0.mindspring.com>

Brad McBride wrote in message <36DEEF03.C05FF9DB@bmcbride.access.one.net>...
:I'm trying to get Perl to return 4 digit years instead of 2 in order to
:deal with Y2k issues, and am having no luck. I am trying to pull the
:time from the system and using the localtime() function, but both return
:the year as 2 digit. How do I get Perl to return the date with a 4 digit
:year.


Ok, you are just missing one little thing.  Perl is not returning the last 2
digits of the current year, it is return the number of years since 1900.
Once we roll over to 2000 perl will not be returning a 2 digit value and all
will be well.  Just keep adding 1900.

HTH

AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
#else /* !STDSTDIO */     /* The big, slow, and stupid way */
 - Larry Wall in str.c from the perl source code






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

Date: Thu, 04 Mar 1999 16:00:04 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Brad McBride <bmcbride@bmcbride.access.one.net>
Subject: Re: getting 4 digit years
Message-Id: <36DEF454.256F28F2@giss.nasa.gov>

[posted and mailed]

Brad McBride wrote:
> 
> I'm trying to get Perl to return 4 digit years instead of 2 in order to
> deal with Y2k issues, and am having no luck. I am trying to pull the
> time from the system and using the localtime() function, but both return
> the year as 2 digit. How do I get Perl to return the date with a 4 digit
> year.

perldoc -f localtime
perldoc POSIX

perl -MPOSIX -e 'print strftime "%Y", localtime;'

> 
> Brad

--
"Soup on all fours?"
"Of course.  Whaddaya think, Soup is a biped?" - mst3k


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

Date: Thu, 04 Mar 1999 13:09:54 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: Brad McBride <bmcbride@bmcbride.access.one.net>
Subject: Re: getting 4 digit years
Message-Id: <36DEF6A2.143ABF8F@atrieva.com>

Brad McBride wrote:
> How do I get Perl to return the date with a 4 digit
> year.

Perl will return a 3 digit date next year.  Is your application able to
handle that?

For all the exciting detail on localtime(), and other time and date
related functions, read the perlfunc manpage that came with your perl
distribution.  You might also want to read the perl FAQ, as I know for a
fact this one is in there.

Good Luck!

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Thu, 04 Mar 1999 21:55:08 GMT
From: robert@iminet.com (Robert Saunders)
Subject: Getting rid of ^M
Message-Id: <93FC37484AE94431.AF00EC6CCB0B644D.3399BC3470455A35@library-proxy.airnews.net>


I am sure this is very simple.. but I have a data files that gets
created and I open it up and want to take out the ^M at the end of
several lines.. 

I have tried the simple 

$data_line =~ s/\^M//ig;

With no luck.. it doesnt seem to want to remove it.. I have been
looking the perl books I have but so far have not ran across the
symbol.. 


Robert Saunders
robert@iminet.com



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

Date: Thu, 04 Mar 1999 20:14:14 GMT
From: cindy_conway@my-dejanews.com
Subject: help using system()
Message-Id: <7bmpic$8s$1@nnrp1.dejanews.com>

Hi All,

I am trying to use system() on a Perl script running on an NT system. I need
to invoke a windows application called Bar Tender.I've written it like this:

system("bartend") #bartend.exe is the program file

When I run the script, nothing happens. If I write the same line of code, and
I try to invoke an application that is located under the winnt directory
(like, say, notepad or pblush), it runs no problemo.

Anyone else ever run into this?

Thanks
Cindy

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


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

Date: Thu, 04 Mar 1999 20:59:41 GMT
From: dturley@pobox.com
Subject: Re: Help with Perl CGI script type conversion
Message-Id: <7bms7n$2rj$1@nnrp1.dejanews.com>

In article <bwAD2.5847$SI4.1195643@hme2.newscontent-01.sprint.ca>,
  billm@concentric.net (Bill Morland) wrote:
> If you look at the following chunk of code:
>
> print header;
> print start_html('A Simple Example'),
>     h1('A Simple Example'),
>     start_form,
>     "CD Code     ",testfield('cdcode'),
>     p,
>     "Artist Code ",textfield('artistcode'),
>     p,
>     "Song Code   ",textfield('songcode'),
>     p,
>     submit,
>     end_form,
>     hr;
>
> When run as a CGI script, this creates a simple HTML form.
>
> My problem is I want to use the"post"ed variables as integers, not character
> strings.

So what happened when you used it?
#!/usr/local/bin/perl
my $str = "2"; #looks like a "string"
my $total = $str + 1; #oops, I used it as an integer
print $total; #prints 3, so it must have treated it like an integer!
print "\n";
$new_string = $str . "1"; #now I treat it as a "string"
print $new_string; #prints 21, so it must have concatenated it like a string!

> How can I get the form to retrun integer values? or how can I convert a text
> string to an integer in Perl?

Why do you need to do it when it's built in?

cheers,
--

____________________________________
David Turley

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


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

Date: Thu, 04 Mar 1999 15:09:22 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
Subject: Re: HELP with type conversion in Perl
Message-Id: <36DEE872.4C099A92@giss.nasa.gov>

Tony Curtis wrote:
> 

[Re: string to number type conversions]

> (is this in the FAQ somewhere?  I couldn't see it
> addressed explicitly in perlfaq4)

I didn't see it in the FAQ either.  Here's something
from "perldata" in the "Scalar Data" section:

print << 'EOQUOTE';
Scalar variables may contain various kinds of singular data,
such as numbers, strings, and references. In general, 
conversion from one form to another is transparent. 
EOQUOTE

	Jay Glascoe
--
"Soup on all fours?"
"Of course.  Whaddaya think, Soup is a biped?" - mst3k


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

Date: Thu, 04 Mar 1999 15:55:34 -0500
From: Eric Moyer <Eric@PAInternetServices.com>
Subject: How to do a Case-insensitive Sort?
Message-Id: <36DEF345.6C10479C@PAInternetServices.com>

I'd like to know if there is a way to do a case-insensitive sort, while
still preserving the initial values of the items being sorted (I don't
want everything converted to lower-case or upper-case).

Any help would be appreciated.

Thanks.



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

Date: Thu, 4 Mar 1999 16:09:07 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: How to do a Case-insensitive Sort?
Message-Id: <7bmsde$bqo$1@camel21.mindspring.com>


Eric Moyer wrote in message <36DEF345.6C10479C@PAInternetServices.com>...
:I'd like to know if there is a way to do a case-insensitive sort, while
:still preserving the initial values of the items being sorted (I don't
:want everything converted to lower-case or upper-case).
:

How about:

#!/usr/local/bin/perl -w
use strict;
my @foo = qw(This is just The start this Is Just the Start);
@foo = sort {lc($a) cmp lc($b)} @foo;

HTH

AmD

--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
When you come to a fork in the road take it.
 - Yogi Berra






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

Date: Thu, 04 Mar 1999 16:07:58 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Eric Moyer <Eric@PAInternetServices.com>
Subject: Re: How to do a Case-insensitive Sort?
Message-Id: <36DEF62E.E7ED0BE6@giss.nasa.gov>

[posted and mailed]

Eric Moyer wrote:
> 
> I'd like to know if there is a way to do a case-insensitive sort, while
> still preserving the initial values of the items being sorted (I don't
> want everything converted to lower-case or upper-case).

my @sorted = sort { lc $a cmp lc $b } @list;

> Any help would be appreciated.
> 
> Thanks.

--
"Soup on all fours?"
"Of course.  Whaddaya think, Soup is a biped?" - mst3k


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

Date: Thu, 04 Mar 1999 20:54:30 GMT
From: soup <soup@ampersand.com>
Subject: Howto build perl 5.005_02 & modules using VC++ on Win95 & Win98
Message-Id: <7bmru2$2ep$1@nnrp1.dejanews.com>

Howto build perl 5.005_02 & modules using VC++ on Win95 & Win98

Why did I do this?
------------------
Having used perl for the last 9 years, it's an indispensible part of
my professional life.  I use a laptop computer running Win98 as the
only computing appliance that I physically touch because I have to be
productive while mobile.  I can't get NT to deal with swappable PC
cards & DHCP, and I don't feel like rebooting to NT each time I want
to do some Windows module development or building.  Therefore, I need
Windows 9X to be able to build perl and modules.

I'm not going down the ActiveState pre-compiled binary path for
various reasons, one of which is that it is not freely
re-distributable to our clients.

Thanks to
---------
Steven Morlock <newspost@morlock.net>, who blazed most of this path in
his previous message "HOWTO: Builiding Perl under Win95/98" where he
showed how to build core version 5.005.53

How to do it
------------
(This worked for VC++ 6.0 on Win98, I haven't tried it on other
combinations.  YMMV.)

    1.  Install Visual C++, but do *not* put it in under directory
        paths with spaces in them.  Include all the VC definitions from
	VCVARS32.BAT in the shell you ultimately use to compile
	(I just set them in the AUTOEXEC.BAT file).

    2.  Install the 4nt shell.  You can get a 21 day eval copy from:
		ftp://jpsoft.com/4nt/4nt301.zip
	After 21 days, you need to fork over $80.  Don't be concerned
	by all the recommendations that you should only be using this
	on NT, it works OK on Win9X.

	First stick all the 4NT files somewhere (e.g. C:\4NT).
	Next, copy 4NT.EXE to CMD.EXE (necessary to pass more tests).
	Then, in C:\autoexec.bat:
	        Include C:\4NT in the PATH
		SET PERL5SHELL=4NT.EXE /C

    3.  Unpack the perl 5.005_02 package somewhere, it can be obained
	from: http://www.cpan.org/src/5.0/perl5.005_02.tar.gz

    4.  In lib\ExtUtils\MM_Unix.pm, change the Makefile template
	lines in functions xs_c and xs_o that contain "&&" to
	instead be 2 separate lines.  Specifically:

        -----------------------------------------------------------
        *** MM_Unix.pm~	Sat Feb 20 17:38:00 1999
        --- MM_Unix.pm	Sat Feb 20 17:46:02 1999
        ***************
        *** 3478,3484 ****
              return '' unless $self->needs_linking();
              '
          .xs.c:
        ! 	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >$*.tc && $(MV) $*.tc $@
          ';
          }

        --- 3478,3485 ----
              return '' unless $self->needs_linking();
              '
          .xs.c:
        ! 	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >$*.tc
        ! 	$(MV) $*.tc $@
          ';
          }

        ***************
        *** 3494,3500 ****
              return '' unless $self->needs_linking();
              '
          .xs$(OBJ_EXT):
        ! 	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c
          	$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
          ';
          }
        --- 3495,3502 ----
              return '' unless $self->needs_linking();
              '
          .xs$(OBJ_EXT):
        ! 	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >xstmp.c
        ! 	$(MV) xstmp.c $*.c

$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
          ';
          }
        -----------------------------------------------------------

	Make sure that the first character on each of the changed
	lines is a single <TAB>.

    5.	Edit win32/Makefile:
	     INST_DRV  = installed drive (e.g. "d:")
	     INST_TOP  = top level of installed perl
		         (e.g. "$(INST_DRV)\w\perl")
	     EMAIL = <your email address>

    6.	Add the following line to ext/Errno/Errno_pm.PL:

        *** Errno_pm.PL~	Wed Feb 24 17:19:30 1999
        --- Errno_pm.PL	Wed Mar 03 10:05:54 1999
        ***************
        *** 20,25 ****
        --- 20,26 ----

          sub process_file {
              my($file) = @_;
        +     $file =~ s/\\\\/\\/g;

              return unless defined $file;


    7.	Start up the MS-DOS command line shell, run 4nt,
        cd to Win32 under the perl distribution, and run "nmake"

    8.  Run "nmake test", and verify that most tests succeed
	(I got around 98-99% OK)

    9.  Run "nmake install".  The perl binary will be placed in
	$(INST_TOP)/5.00502/bin/MSWin32-x86

   10.  Copy the perl binary (perl.exe) to C:/bin/perl.exe (otherwise
	the module tests won't find it), and put one of the directories
	containing perl.exe in your PATH.

  At this point you have installed core perl, but you no doubt also
  want most of libwin32 version 0.14 (or whatever is latest), you
  can get it at:

     http://www.cpan.org/modules/by-module/Win32/libwin32-0.14.tar.gz

   11.  Unpack the libwin32 distribution, cd into it, and delete
        the blib tree (this contains pre-compiled binaries that
        probably won't work for you).

   12.  In each of the directories:
	     ODBC
	     OLE
	     Pipe
	     Process
	     Shortcut
	in file Makefile.PL you have to change the line:

	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp

	to the two lines:

	$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG)
$(XSUBPPARGS) $*.xs >xstmp.c
	$(MV) xstmp.c $*.cpp

	Make sure that the first character on each of the changed
	lines is a <TAB>.

   13.	With the 4nt shell again, for each of the following directories
	in the following order, do steps (a) - (e) below:

	     WinError
	     Registry
	     OLE         -- have to bring up Excel before running tests
	     File
	     IPC
	     Mutex
	     Semaphore
	     Process
	     Clipboard
	     Pipe
	     Event
	     ChangeNotify
	     TieRegistry
	     ODBC	 -- got some failed tests, but I think they're benign
	     Internet    -- requires live internet connection
	     Sound
	     Console

	(a) cd to the directory
	(b) type "perl Makefile.PL"
	(c) type "nmake"
	(d) type "nmake test"
	(e) type "nmake install"


	These modules will not pass tests on Win98 for me:

	     Shortcut     -- fails resolve test
	     PerfLib      -- fails 4/6 tests
	     FileSecurity -- test requires NTFS partition
	     NetResource  -- test requires NTFS partition
	     NetAdmin     -- test requires NTFS partition and live network
	     Service      -- NT specific
	     EventLog     -- NT specific
	     APINet       -- ?
	     APIRegistry  -- ?


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


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

Date: Thu, 04 Mar 1999 20:02:10 GMT
From: nabil@umit.maine.edu
Subject: Image upload
Message-Id: <7bmorr$vjt$1@nnrp1.dejanews.com>

Hi I am writing a program to upload an image from Netscape using CGI-lib.pl
Once my file is uploaded from the hard drive to the server it's in Ascii
format not binary Can any one tell me how i can upload an image from the hard
drive to the server using CGI program in Perl

Thanks

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


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

Date: Thu, 04 Mar 1999 20:34:17 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Load an array from a file.
Message-Id: <36e2eddf.1623143@news.skynet.be>

Robert B. Ganz wrote:

>I was wonder if Perl is capable of loading an array from a file?

Try:

	chomp(@array = <FILE>);

	Bart.


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

Date: Thu, 4 Mar 1999 22:04:06 +0100
From: "Boris" <boris.petrovic@pu.tel.hr>
Subject: Re: MS Excel to HTML converter?
Message-Id: <7bmsh9$nq3$1@as102.tel.hr>

Gary Kakazu wrote in message <36DEC986.F1578F4F@tdstelecom.com>...
>I'd like to automate the process of taking Microsoft Excel files and
>displaying them on the web. Are there any perl modules that will take an
>Excel file (.xls format) and convert it to an HTML table?

I guess it is possible, but I think you will be far more satisfied if you
let Excel generate those tables for you (when saved, for example). That way
your server will be happy.

If you need more information, contact me on e-mail.
--

   Boris Petrovic
   boris.petrovic@pu.tel.hr




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

Date: Thu, 04 Mar 1999 14:32:13 -0600
From: Brett Johnson <brett@amcu-tx.sps.mot.com>
Subject: Perl interface with yppasswd
Message-Id: <36DEEDCD.5316045D@amcu-tx.sps.mot.com>

I am trying to do something somebody probably has already done, but
I can't find. I am taking a modified version on Larry's passwd
program and trying to interface it with 'yppasswd' instead of the
local /etc/passwd file. I've done similar shell scripts before
and interfacing using sub-shells and Here Documents. That does not
seem to work with Perl. My questions are,
1. Has somebody already does this?
2. If not is the use of the open2() the best way to setup interactive
communication with a yppasswd process?

--

+------------------------------------------------------------------+
| Brett Johnson                 phone:   (512) 895-6919            |
|                                                                  |
| Software Support                                                 |
| TSG - AVSD/DSCS               address: 6501 William Cannon West  |
| (Design Software -                     Austin, Texas 78735       |
|  Computer Services)                    Maildrop: OE320           |
|                                                                  |
| Motorola                      email:   brett@amcu-tx.sps.mot.com |
+------------------------------------------------------------------+


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

Date: 4 Mar 1999 19:59:48 GMT
From: Kodachrome Halpern <revjack@radix.net>
Subject: Re: procmail-ish mail handler in perl?
Message-Id: <7bmonk$7c4$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight

Elaine Ashton explains it all:
:Lindbergh Loomis wrote: 
:> Has anyone here taken the plunge and authored their own e-mail handler
:> application, in lieu of procmail or 3rd-party spamgards? Any success or
:> failure stories?

:tom has some cool stuff here;
:http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/ qmail
:is written in Perl as is majordomo and a bunch of other doodads...so,
:I'm sure that it has been done. 

Thanks, but:

http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/msort

404 - NOT FOUND

http://www.cpan.org/modules/by-authors/Tom_Christiansen/scripts/qmail

404 - NOT FOUND

-- 
  /~\  trolley slogging halide intrude Lenten precarious sightsee cham
 C oo  Mahayana country cedar monotonous everyman clinician Bootes pla
 _( ^) 1 , 0 0 0 , 0 0 0   m o n k e y s   c a n ' t   b e   w r o n g
/___~\ http://3509641275/~revjack  03/04/99 14:58:43 revjack@radix.net


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

Date: Thu, 4 Mar 1999 15:35:47 -0500
From: "Robert E Webb" <bwebb@fred.net>
Subject: Regex example from Camel book
Message-Id: <u8CD2.165$F4.217450@news.abs.net>

On page 74 of the Camel book (2nd Edition), there is an example of a regex
that adds commas to a number. It looks like this:

1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;

Well I wrote the following script:

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

use strict;

1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;

and created a file that has different sized numbers like

1234
123
123456789
and finally,
12345.6789

The regex works for all except the last example, it adds commas to the right
of the decimal point. Dosn't the atom (?!\d) say "up to something not a
number"? If so, why is the regex adding commas to the right of the decimal?

And here maybe a rookie question...

when I write a script like this:

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

$qq=12345.6789;
$qq =~ 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
print "$qq\n";

I get use of unitialized variable.

Thanks,
Bob/








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

Date: Thu, 04 Mar 1999 12:23:21 -0800
From: rg3@iname.com
Subject: scripting image conversions?
Message-Id: <RYBD2.2158$xv.16666365@WReNphoon2>

I have a question regarding converting Sun raster images into .tiff
files. Unfortunately, I need to convert a couple thousand images.
There is a program on my Sun called Image Viewer (version 1.0 by Sun)
which I am able to view the Sun raster images and convert it to the
 .tiff that is required for the new software my work will be switching to.

Is it possible to create a script that would do this process so I
wouldn't need to convert each image one at a time? I have no
experience with scripting but have a perl and awk manual to reference.

Thanks for any help or suggestions,
Rico
orca@netisle.net
rg2@iname.com



**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****


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

Date: 04 Mar 1999 22:48:42 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: scripting image conversions?
Message-Id: <8390ddj58l.fsf@vcpc.univie.ac.at>

Re: scripting image conversions?, rg3
<rg3@iname.com> said:

rg3> I have a question regarding converting Sun
rg3> raster images into .tiff files. Unfortunately,
rg3> I need to convert a couple thousand images.
rg3> There is a program on my Sun called Image
rg3> Viewer (version 1.0 by Sun) which I am able to
rg3> view the Sun raster images and convert it to
rg3> the .tiff that is required for the new software
rg3> my work will be switching to.

Try Image::Magick, a perl i/f to the ImageMagick
suite of programs.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien.  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Thu, 04 Mar 1999 20:17:28 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Undef subr &Treader::get called ???
Message-Id: <36dfea42.698261@news.skynet.be>

David Van den Brande wrote:

>use LWP::Simple;
>package Treader;

Maybe it'll work if you swap those two lines.

	Bart.


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

Date: Thu, 04 Mar 1999 20:14:34 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <36dee8f6.366294@news.skynet.be>

Larry Rosler wrote:

>On MSWin32 I get the same (correct) result as you did using Linux.  The 
>results of this crypt() on FreeBSD are totally bogus.

Waht do you mean, "bogus"? It is the crypt() as it applies to this one
particular platform. It *works* for generating encrypted passwords for
that platform.

>`man 3 crypt` states that 'The first two characters [of the encrypted 
>password] are the salt itself.'  It also says that the 'salt' characters 
>must be chosen from the set
>
>  [a-zA-Z0-9./]

What "man"? The man pages for *your* platform. So those are the rules
for *that* one particular platform. It has never been stated that this
is the "one and only" way it could be done.

I prefer the "bogus" way that works, over the "correct" way that gives
useless results.

	Bart.


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

Date: Thu, 4 Mar 1999 13:51:07 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <MPG.1148a029a3a85da49896de@nntp.hpl.hp.com>

In article <36dee8f6.366294@news.skynet.be> on Thu, 04 Mar 1999 20:14:34 
GMT, Bart Lateur <bart.lateur@skynet.be> says...
> Larry Rosler wrote:
 ...
> >`man 3 crypt` states that 'The first two characters [of the encrypted 
> >password] are the salt itself.'  It also says that the 'salt' characters 
> >must be chosen from the set
> >
> >  [a-zA-Z0-9./]
> 
> What "man"? The man pages for *your* platform. So those are the rules
> for *that* one particular platform. It has never been stated that this
> is the "one and only" way it could be done.

Would it be possible for you to show us the man page for crypt on your 
FreeBSD system?  A web search didn't turn one up for me.

-- 
Larry Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 04 Mar 1999 20:34:07 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: y2k and 4-digit dates (was Re: foreach and while)
Message-Id: <36e1ed57.1487149@news.skynet.be>

Staffan Liljas wrote:

>Actually, AD1-AD9999 isn't really the overwhelming majority of all
>cases. The Universe has existed for about 2E10 years

But how many of those count with regards to civilisation?

	Bart.


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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