[10557] in Perl-Users-Digest
Perl-Users Digest, Issue: 4148 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 4 14:08:05 1998
Date: Wed, 4 Nov 98 11:00:28 -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 Wed, 4 Nov 1998 Volume: 8 Number: 4148
Today's topics:
Re: ActivePerl (b 506) & IIS4 cgi keeps browser waiting <rootbeer@teleport.com>
Re: amd-k as opposed to INTEL <rootbeer@teleport.com>
Re: converting rfc822 files to MAPI messages ? <rootbeer@teleport.com>
Difference between netscape and microsoft cgi handling? <ours@casema.net>
Difference between netscape and microsoft cgi handling? <ours@casema.net>
Re: Easy problem with @ARGV dave@mag-sol.com
Re: Easy problem with @ARGV <nospam@see.signature>
Re: Easy problem with @ARGV <egwong@netcom.com>
Re: Easy problem with @ARGV <rootbeer@teleport.com>
From Unix to WinNT <smiles@wfubmc.edu>
Re: Getting Multiple inputs <rootbeer@teleport.com>
Re: Getting Multiple inputs (brian d foy)
Re: Help -- Need Sybperl <tpitts@mediaone.net>
Re: Help with memory in Perl <rootbeer@teleport.com>
Help: Shared memory block as hash of hash <smalunjk@cisco.com>
How does xyz.pl?go=100 links work ? <kramer_se@yahoo.com>
Re: How to assign a network share in Perl <rootbeer@teleport.com>
Re: How to strip Local URL's and IMG's from files? <rootbeer@teleport.com>
Re: how to write from 2 files to 1 (Collin Rogowski)
Re: illegitimate data types ? <r28629@email.sps.mot.com>
images in perl (Operator)
Re: List of files to an array... <rootbeer@teleport.com>
Re: More flushing buffer to STDOUT <rootbeer@teleport.com>
Re: Not to start a language war but.. <hyoon@bigfoot.com>
Re: opening illegal filenames <harrisp2@cf.ac.uk>
Re: opening illegal filenames (brian d foy)
Re: opening illegal filenames <rootbeer@teleport.com>
Re: Oracle database <rootbeer@teleport.com>
Re: pass array to sub <merlyn@stonehenge.com>
Pattern matching alan@ciborg.demon.co.uk
Re: Perl and Directory Permissions problem w/ IIS 3.0 <rootbeer@teleport.com>
Re: perl modules (J Holden)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 04 Nov 1998 17:18:45 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: ActivePerl (b 506) & IIS4 cgi keeps browser waiting!!
Message-Id: <Pine.GSO.4.02A.9811040918100.7431-100000@user2.teleport.com>
On Tue, 3 Nov 1998, firmanf wrote:
> Subject: ActivePerl (b 506) & IIS4 cgi keeps browser waiting!!
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 17:49:16 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: amd-k as opposed to INTEL
Message-Id: <Pine.GSO.4.02A.9811040947440.7431-100000@user2.teleport.com>
On Wed, 4 Nov 1998, stacy wright wrote:
> I'm trying to download an older version of perl from one of the sites
> suggested in "information about perl " section of the perl institute's
> homepage. My question is, can I use to perl download for the intel chip
> if I'm using a machine using an AMD-K processor.
If you can compile Perl successfully, it doesn't matter what processer
you're using. Of course, if you're downloading a binary that may be
incompatible with your system (or have worse problems), you should check
with someone who knows about your system and its requirements. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 17:38:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: converting rfc822 files to MAPI messages ?
Message-Id: <Pine.GSO.4.02A.9811040937460.7431-100000@user2.teleport.com>
On 3 Nov 1998, muzo wrote:
> Newsgroups: comp.lang.perl.misc, comp.lang.perl
If your news server still lists comp.lang.perl as an active newsgroup,
replace your news admin. That group is defunct. When it was active,
Kevin Costner was still thought of as a promising film director.
> Any scripts to parse rfc822 files, MIME attachments, read and write
> MAPI properties are welcomes.
If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-) Hope this helps!
http://www.perl.org/CPAN/
http://www.perl.com/CPAN/
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 4 Nov 1998 18:56:18 +0100
From: "Casema" <ours@casema.net>
Subject: Difference between netscape and microsoft cgi handling?????
Message-Id: <71q4rn$bf8$1@sun4000.casema.net>
I created a a simple test.bat in my cgi-bin directory on
195.166.50.141/cgi-bin/
now, when I open this in netscape nav. it does what I hoped.
In ie it runs the stupid thing on my computer instead of on the server....
why is this????
to try use this: http://195.166.50.141/cgi-bin/test.bat
I am pulling my hair out by now.
Are there any standards on the .... net?
Thanks for supporting me,
Michel
------------------------------
Date: Wed, 4 Nov 1998 18:56:18 +0100
From: "Casema" <ours@casema.net>
Subject: Difference between netscape and microsoft cgi handling?????
Message-Id: <71q4i1$7fc$1@sun4000.casema.net>
I created a a simple test.bat in my cgi-bin directory on
195.166.50.141/cgi-bin/
now, when I open this in netscape nav. it does what I hoped.
In ie it runs the stupid thing on my computer instead of on the server....
why is this????
to try use this: http://195.166.50.141/cgi-bin/test.bat
I am pulling my hair out by now.
Are there any standards on the .... net?
Thanks for supporting me,
Michel
------------------------------
Date: Wed, 04 Nov 1998 17:13:38 GMT
From: dave@mag-sol.com
Subject: Re: Easy problem with @ARGV
Message-Id: <71q202$831$1@nnrp1.dejanews.com>
In article <71pr6u$uii$1@nnrp1.dejanews.com>,
rfreytag@my-dejanews.com wrote:
> Hi Folks,
>
> Here is an easy one for you. I am trying to grab my command line arguments
> after the program name and print out the arguments. The catch is that the
> arguments are wildcarded pathnames.
>
> Here is the code:
>
> #!/usr/bin/perl -w
>
> ($from, $to) = @ARGV;
>
> chomp( $from, $to);
>
> print "0\n";
>
> print "( $from, $to)\n";
>
> print "1\n";
>
> print "\$from: $from\n";
>
> @list = glob( "$from");
>
> print "2\n";
>
> print @list;
>
> print "\n";
>
> die "break in program\n";
>
> end code. Here is the execution (the prompt is "rfreytag@freytag%":
>
> rfreytag@freytag% ./g.pl /home/rfreytag/* /*
>
> 0
>
> ( /home/rfreytag/Macjordomo.hqx, /home/rfreytag/coreproof)
>
> 1
>
> $from: /home/rfreytag/Macjordomo.hqx
>
> 2
>
> /home/rfreytag/Macjordomo.hqx
>
> break in program
>
> rfreytag@freytag%
>
> end execution display.
>
> As you can see the wildcarded filenames (/home/rfreytag/*), are being
> interpreted. If I put $from and $to in single quotes (' '), then the
> variable contents are not printed. Here is the question:
>
> Q: How does one avoid (simple solution please!), having wildcarded filenames
> being evaluated to the directory contents when printing out the contents of a
> scalar variable that is a wildcarded filename?
>
> Thanks! (See I told you it was simple)
Doesn't sound like a Perl problem to me, more like a command shell one. I'm
guessing that you're on a Unix system. Most (all?) Unix command shells will
always expand all bare wildcards on the command line before passing them to
the program.
The keyword here is 'bare', to prevent sh or bash or whatever from expanding
the wildcard you just put it in quotes (either single or double will both
work.
To demonstrate, put a file called test.thing in your current directory and
execute these two command lines:
perl -e 'print shift' test.*
perl -e 'print shift' 'test.*'
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://london.pm.org/>
[Note Changed URL]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 4 Nov 1998 09:07:10 -0800
From: "J|rgen Exner" <nospam@see.signature>
Subject: Re: Easy problem with @ARGV
Message-Id: <71q1i3$36a@news.dns.microsoft.com>
rfreytag@my-dejanews.com wrote in message
<71prc0$umo$1@nnrp1.dejanews.com>...
[...]
>As you can see the wildcarded filenames (/home/rfreytag/*), are being
>interpreted. If I put $from and $to in single quotes (' '), then the
>variable contents are not printed. Here is the question:
>Q: How does one avoid (simple solution please!), having wildcarded
filenames
>being evaluated [...]
This has nothing to do with Perl and it's an FAQ for Unix.
Obviously you are using some kind of Unix shell ([tc]sh, bash, ksh, ...)
rather than DOS command.com or 4DOS or 4NT.
In Unix shells file name globbing (that is wildcard expansion) is done by
the Shell. This means the wildcards in a command line argument are expanded
by the shell BEFORE PASSING THEM TO THE PROGRAM.
Therefore the program will never see the wildcards, the file globbing has
been taken care of by the shell already. This ensures consistant file name
globbing for all programs.
If you want to enter reserved characters (aka wildcards) as program
arguments, then you must escape them in the input line, e.g. use "\*" or
enclose the argument in single quotes (for details please see the man page
of your shell).
jue
--
J|rgen Exner; microsoft.com, UID: jurgenex
Sorry for this anti-spam inconvenience
------------------------------
Date: Wed, 4 Nov 1998 17:23:57 GMT
From: Eric Wong <egwong@netcom.com>
Subject: Re: Easy problem with @ARGV
Message-Id: <egwongF1wqzy.Kp9@netcom.com>
rfreytag@my-dejanews.com wrote:
: Q: How does one avoid (simple solution please!), having wildcarded filenames
: being evaluated to the directory contents when printing out the contents of
: a scalar variable that is a wildcarded filename?
Hi,
I don't think that this is a perl problem, what's happening is
that your shell is expanding the pathnames before it passes
the args to your script. You can either try running your shell
without pathname expansion (see the manpage, for bash I think
it's the -f flag) or you can remember to escape *'s and ?'s.
Another solution would be to move to a less-helpful OS like
ms-dos. (I can't believe I'm recommending ms-dos :)
Eric
[cc'd]
------------------------------
Date: Wed, 04 Nov 1998 18:58:09 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Easy problem with @ARGV
Message-Id: <Pine.GSO.4.02A.9811041054030.7431-100000@user2.teleport.com>
On Wed, 4 Nov 1998 rfreytag@my-dejanews.com wrote:
> Subject: Easy problem with @ARGV
Any reason you posted this twice? If you're not sure that posting
succeeded, use a test newsgroup.
> Q: How does one avoid (simple solution please!), having wildcarded
> filenames being evaluated to the directory contents when printing out
> the contents of a scalar variable that is a wildcarded filename?
Quote the filenames according to the rules for your shell. Hope this
helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 11:43:14 -0500
From: Steve miles <smiles@wfubmc.edu>
Subject: From Unix to WinNT
Message-Id: <36408422.FC222585@wfubmc.edu>
Hi all,
I've written all of my Perl scripts for the Unix platform, and now I
have to install some of them on a WinNT server. Am I in for a big
surprise or will it be easy to move them to the WinNT server. I'd hate
to have to program some more...Does anyone have some war stories about
moving their scripts to WinNT? Or just thoughts on programming on WinNT?
Thanks!
Steve
------------------------------
Date: Wed, 04 Nov 1998 17:08:56 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Getting Multiple inputs
Message-Id: <Pine.GSO.4.02A.9811040908150.7431-100000@user2.teleport.com>
On Tue, 3 Nov 1998, Mike wrote:
> How could you make it so you can get an input with multiple values
> attached?
>From the rest of your message, I think you're talking about CGI
programming. Use the CGI module; that makes it easy. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 12:59:21 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Getting Multiple inputs
Message-Id: <comdog-ya02408000R0411981259210001@news.panix.com>
In article <363FA562.B95A8058@counter.w-dt.com>, Mike <support@counter.w-dt.com> posted:
> How could you make it so you can get an input with multiple values
> attached? Like <select name=info multiple>
use CGI;
it will do everything for you. see the docs for details.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 04 Nov 1998 17:46:45 GMT
From: Theresa Pitts <tpitts@mediaone.net>
Subject: Re: Help -- Need Sybperl
Message-Id: <364092F5.B093AF14@mediaone.net>
Unfortunantly, I am in a similar position regarding the C compiler. I have
obtained the ActiveState version of Perl and using ppm.pl installed DBI and
DBD-Sybase. The Sybase module is incomplete. It does not include Sybase.pm. I
haven't been able to find anyone at ActiveState to notify, so I think that I am
SOL.
Any ideas?
Theresa
Michael Peppler wrote:
> Monty Taylor wrote:
> >
> > I would like to play with Sybperl or DBD:Sybase to do things a tad more
> > directly. However, I don't have a compiler on the Windows side and the UNIX
> > admins here don't believe Perl should be used in production, so they won't
> > install any bits for me (SMITE THEM ALL! It's SO frustrating not being an
> > admin)
>
> That is the most backward policy I have seen in a long time!
>
> > I do have Perl on my Windoze machine. (Win 95) I'm running the version I
> > downloaded from Solutionsoft with Perl Builder, if it makes any difference.
>
> If you get the ActiveState version of perl you can get binaries that
> work
> with it from their site. THis includes DBD::Sybase and sybperl.
> I've not used it but I believe that ActiveState includes a special
> little script that helps you to install the packages (I think it's
> called
> ppm.pl). Failing that the binaries are in
> http://www.activestate/packages/zips...
>
> Michael
> --
> Michael Peppler -||- Data Migrations Inc.
> mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
> Int. Sybase User Group -||- http://www.isug.com
> Sybase on Linux mailing list: ase-linux-list@isug.com
------------------------------
Date: Fri, 30 Oct 1998 16:20:21 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help with memory in Perl
Message-Id: <Pine.GSO.4.02A.9810300809370.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Rob Clark wrote:
> I've got a program that runs fine with small inputs but falls over
> with a 135mb core file when run under greater loads. I'm assuming that
> what we have here is a memory leak of some sort.
That's a big assumption. But it's a possibility, of course. Why not use
(something like) gdb on the core file, to see where it's crashing?
> I didn't write the code so I'm not in a good position to debug it
> without help. What I'd like to know is whether there is a way I can
> see how Perl's internal usage of memory is going as the program
> executes and maybe track down the part that is causing the problem.
> Also anything that can flag data that is not being reused by the
> garbage collector for whatever reasons would be an enormous help.
Many (many!) memory leaks were eliminated in the 5.004 release of Perl;
maybe simply installing 5.004_04 would solve your problems.
For another idea, you could step through your program with the Perl
debugger, while using a utility like 'top' to monitor its memory use.
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 10:12:15 -0800
From: Sanjay Malunjkar <smalunjk@cisco.com>
Subject: Help: Shared memory block as hash of hash
Message-Id: <364098FF.3F4FF333@cisco.com>
Hi all,
In one of my programs, I want to use a shared memory block for
communication between children and parent processes. I would like to use
this shared memory block as a hash of hash like
('customer' => {'10' => ['msg1', 'msg2', 'msg3'], '20' => ['msg4',
'msg5']},
'public' => {'778', => ['msg6']}
);
How can I do this ?
thanks in advance,
sanjay
------------------------------
Date: 4 Nov 1998 18:49:45 GMT
From: "Martin" <kramer_se@yahoo.com>
Subject: How does xyz.pl?go=100 links work ?
Message-Id: <01be0823$cf691300$6108d1d4@algonet.se>
Hello, I have a small problem ...
I want to call a perl script without making a input form on the page.
I want to call it by using something like this : <a href="xyz.pl">My
script</a>
( I know how to user input forms on a html page and use the iformation from
the forms into the perl script. )
I have seen links made like : <a href="xyz.pl?go=100">My script</a>
How does this work ?
Can I point at a cirtan place in the script ?
If you know the solution please e-mail me at : kramer_se@yahoo.com
I culd use some perl links to, send them th the above stated adress.
Thanks!
/Martin
------------------------------
Date: Wed, 04 Nov 1998 17:13:51 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to assign a network share in Perl
Message-Id: <Pine.GSO.4.02A.9811040912350.7431-100000@user2.teleport.com>
On Tue, 3 Nov 1998, CLee wrote:
> 1. Get drive free space from a server across a TCP/IP connection
Implement a protocol which lets you request that of the server.
> 2. Get available WINS addresses from the WINS Server
Perhaps the docs, FAQs, and newsgroups about WINS (whatever that is) would
be able to help you with this.
> 3. Capture Errors from the event log from the server across the network.
Implement a protocol which lets you request that of the server.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 18:30:11 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to strip Local URL's and IMG's from files?
Message-Id: <Pine.GSO.4.02A.9811041029400.7431-100000@user2.teleport.com>
On 4 Nov 1998, Paulo Jorge Matos - LEI wrote:
> I'm having trouble finding a perl script that,
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 16:03:09 GMT
From: collin@rogowski.de (Collin Rogowski)
Subject: Re: how to write from 2 files to 1
Message-Id: <36407a35.18830887@news.uni-X.net>
If the files are reasenable small (whatever this means ;-) try this:
@old = <OLD>;
@tmp = <TMP>;
for ($i = 0; $i < 3; $i++) {
print NEWFILE $old[$i];
}
print NEWFILE $tmp[4];
for ($i = 5; $i < 8; $i++) {
print NEWFILE $old[$i];
}
yours,
Collin Rogowski
On Mon, 02 Nov 1998 16:15:50 GMT, baillie@my-dejanews.com wrote:
>if I have a file(OLDFILE) with say..8 entries in it and I copy the 4th entry
>to a different file(TMPFILE) how can I then
>
> -write the first 3 entries from(OLDFILE) to a new file(NEWFILE)
> -write the 4th entry from(TMPFILE) to (NEWFILE)
> -write the 5th-8th entries from(OLDFILE) to (NEWFILE)
>
>and then I would rename($newfile, $oldfile).
>
>I'm pretty stumped, here's what I'm trying now, but it's not working..
>
> while(<OLD>) {
> print NEW $_ if $_ !~ $choice_array[--$choice];
> }
> while(<TMP>) {
> print NEW $_;
> }
> while(<OLD>) {
> next if $_ +~ $choice_array[--$choice];
> print NEW $_;
> }
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 04 Nov 1998 12:22:45 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: illegitimate data types ?
Message-Id: <36409B75.3A05A6EB@email.sps.mot.com>
mgrabens@my-dejanews.com wrote:
>
> In the following code snigglet, does this create an illegitimate data type?
> $myhash{key1} = 'Person';
> $myhash{key1}{fname} = 'Mike';
> $myhash{key1}{lname} = 'Grabenstein';
> $myhash{key2} = 'Class';
> ... etc ...
I would suggest you try them line by line in the debugger, do an 'x
\%myhash' after each line, to see what changes you made to %myhash. Then
you can RTFM to find out more:
perldoc perlref
perldoc perldsc
> I have used this before and not had a problem, but wonder if I am exploting
> some bug in Perl that will eventually disappear, or is this another wonderful
> feature of Perl ??
Are you sure? I know it's exciting to believe that you found a perl bug,
but never think about it until you prove that it isn't your mistake.
> Please CC me on your response. TIA
But you need to add your true email address to the reply-to field.
-tk
------------------------------
Date: 2 Nov 1998 00:06:35 GMT
From: root@ejv108.rh.psu.edu (Operator)
Subject: images in perl
Message-Id: <71it2b$18je@r02n01.cac.psu.edu>
I have a perl cgi that outputs html, but when I put image html code (<img
src="..."> I get server 500 error. Is there a special way to do this?
------------------------------
Date: Fri, 30 Oct 1998 16:47:18 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: List of files to an array...
Message-Id: <Pine.GSO.4.02A.9810300844460.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Pete Donina wrote:
> I am lookling for an easy way to get a directory structure (path and
> filename) into an array.
I'm not sure what you want. Do you mean something like this?
@file = qw{ usr local bin perl };
> I can do with a FOR loop and a GLOB but, it seems kind of slow.
Well, maybe it is slow. The bottleneck is probably your system spinning a
disk to find what files are in a directory. It soulds as if you want a
list of files from one directory, maybe like this.
opendir DOT, '.'
or die "Can't read '.': $!";
my @files = readdir DOT;
closedir DOT;
If that's not it, maybe you want to use File::Find. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 18:34:12 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: More flushing buffer to STDOUT
Message-Id: <Pine.GSO.4.02A.9811041032230.7431-100000@user2.teleport.com>
On Wed, 4 Nov 1998 rabisteve@my-dejanews.com wrote:
> I have been having the same problem described below with the output
> going to a file.
>
> The file is not written to until I close the link from the server.
Did you flush the output? If you can give a small example a program which
demonstrates that Perl doesn't flush the output when requested, please
file a bug report. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 12:48:16 -0500
From: Hoon Yoon <hyoon@bigfoot.com>
Subject: Re: Not to start a language war but..
Message-Id: <36409360.82944639@bigfoot.com>
How do I get rid of this thread only from Netscape Discussion? I do not
want to see old articles anymore clogging up my window. Just every other
discussion is about this and it's comming down to a slugging match.
Sigh...
Hoon,
------------------------------
Date: Wed, 4 Nov 1998 16:41:36 -0000
From: "Phil Harris" <harrisp2@cf.ac.uk>
Subject: Re: opening illegal filenames
Message-Id: <364090fb.0@d032>
I had the exact same problem, and the only way to consistently cope with the
crappy mac filenames was to come up with a completely random file name.
If you go to Apple's site this is what they do also whenever you download
something from there to a Win32 client.
Works for me at least.
Phil
phil@pharris.force9.co.uk
Shane Stout <sstout@holly.ColoState.EDU> wrote in message
71p4q6$6jj2@holly.ColoState.EDU...
>I hope this is not a newbie question, but please forgive me if it is. I am
>writing a script to check filenames and remove bad characters. This may
not
>sound to difficult but the files are being moved from a mac filesystem to a
>win32 or NT filesystem. Because the ascii codes are different, there are
>things that look ok for a mac that sends NT into a tizzy. The problem I am
>having is that I can't open rename or in any other way manipulate the
files.
>Perl thinks that I have specified a bad filename. I have look at the PERL
>cookbook and it gives a couple of suggestions, sysopen and using a regex to
>manipulate the filename. These work on win98, my laptop, but not on my
server,
>winNT. The script has to live on the server so even though it works for
win98,
>it does not do me alot of good. Any suggestions on how to handle this
situation
>or just some educated guesses would be really appreciated.
>Thanks,
>Shane
>sstout@holly.colostate.edu
------------------------------
Date: Wed, 04 Nov 1998 13:05:11 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: opening illegal filenames
Message-Id: <comdog-ya02408000R0411981305110001@news.panix.com>
In article <71p4q6$6jj2@holly.ColoState.EDU>, Shane Stout <sstout@holly.ColoState.EDU> posted:
> I hope this is not a newbie question, but please forgive me if it is. I am
> writing a script to check filenames and remove bad characters. This may not
> sound to difficult but the files are being moved from a mac filesystem to a
> win32 or NT filesystem. Because the ascii codes are different, there are
> things that look ok for a mac that sends NT into a tizzy.
are you running this script from NT?
how do the files get to the other filesystem initially?
what have you tried so far?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 04 Nov 1998 18:17:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: opening illegal filenames
Message-Id: <Pine.GSO.4.02A.9811040954290.7431-100000@user2.teleport.com>
On 4 Nov 1998, Shane Stout wrote:
> I am writing a script to check filenames and remove bad characters.
You mean, like this?
{
local $_ = lc $filename; # No case confusion
tr/a-z0-9_.//cd; # No bad chars
die "Filename too long" unless length($_) < 16;
die "Bad file name format" unless
/^\w+(?:\.\w+)$/;
$good_filename = $_;
}
> This may not sound to difficult but the files are being moved from a
> mac filesystem to a win32 or NT filesystem.
If you're also dealing with the path delimiters, maybe you want
File::Basename.
> Because the ascii codes are different,
The 'S' in ASCII stands for "Standard". ASCII is the same everywhere. (Of
course, if you're talking about odd, high-bit-set characters, that's
another matter, since those aren't part of ASCII. Some would argue about
little details here, but please not here in the Perl newsgroup.)
> Perl thinks that I have specified a bad filename.
Have you tried the trick from perlfunc's docs on open, for protecting
arbitrary whitespace?
> I have look at the PERL cookbook and it gives a couple of suggestions,
> sysopen and using a regex to manipulate the filename. These work on
> win98, my laptop, but not on my server, winNT.
Maybe you have an old version of Perl there? Or maybe you've found a bug
in that port of Perl. If you can make a simple test case, file a bug
report. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 17:27:47 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Oracle database
Message-Id: <Pine.GSO.4.02A.9811040924330.7431-100000@user2.teleport.com>
On Wed, 4 Nov 1998 webmaster@man.amis.com wrote:
> Can we access our oracle databases from our Intranet through CGI/Perl?
Answer number one: There's no such thing as CGI/Perl. That's like saying
Vacation/Toyota.
Answer number two: Yes, as far as Perl is concerned. That is to say,
there's nothing about Perl which prevents what you're talking about from
being done. Maybe there's something about your databases, your lan, or the
universe which would prevent it. Maybe your local expert or system
administrator can help you more. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 30 Oct 1998 15:48:27 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: pass array to sub
Message-Id: <8cg1c6qce4.fsf@gadget.cscaper.com>
>>>>> "Bart" == Bart Lateur <bart.mediamind@ping.be> writes:
Bart> Randal Schwartz wrote:
>> Typing optimization:
>>
>> join " ", @foo
>>
>> is easier typed as
>>
>> "@foo"
Bart> Note that the result depends on the special variable $" (default is a
Bart> space).
Bart> Actually, Randal, I KNOW you know that, but any newbies stumbling over
Bart> this thread, might not. They do now. :-)
And if you mess with $" in any way other than the following:
{ local $" = ":"; # or whatever
print "@foo"
}
you are assuredly going to confuse *any* maintenance programmer for
your code.
Don't mess with globals, unless you narrow the damage. Important
Maintenance Rule #6.
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Wed, 04 Nov 1998 17:47:40 GMT
From: alan@ciborg.demon.co.uk
Subject: Pattern matching
Message-Id: <364091e8.549241667@news.theplanet.net>
Help!
I am trying to split a .csv file which uses a <,> for a delimiter.
As some of the fields contain a <,> these fields are quoted using <">
so what I want to do is split each value except those included in
double quotes, I have tried:
($Id, $SizeSQ, $SizeSM, $AnnualRent, $RentSQ, $Comments,
$Address,$Agent, $Duplicate)=split(/([^".*?"]|,)/,$_);
I am sure I am making a stupid mistake, but any help would be
appeciated.
TIA,
Alan
------------------------------
Date: Wed, 04 Nov 1998 17:44:30 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl and Directory Permissions problem w/ IIS 3.0
Message-Id: <Pine.GSO.4.02A.9811040943580.7431-100000@user2.teleport.com>
On Mon, 2 Nov 1998, Phil Hoffman wrote:
> I'm currently running an IIS 3.0 server on NT 4.0 SP3, and have a web
> application based upon Perl 5 Build 307. From time to time (unfortunately,
> this is not reproduceable) the link that *should* execute the Perl script
> instead prompts the client to save the file. Its as if the association to
> the *.pl extension has been lost.
Sounds like a problem with your server. Perhaps the docs, FAQs, and
newsgroups about servers could help you here. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 18:13:56 GMT
From: jholden@voyager.net (J Holden)
Subject: Re: perl modules
Message-Id: <71q5h6$7ec@news.voyager.net>
yup....the directory was named something else....thanks
On 3 Nov 1998 22:33:20 GMT, bhilton@tsg.adc.com (Brand Hilton) wrote:
>In article <71nsti$a5m@news.voyager.net>, J Holden <jholden@voyager.net> wrote:
>>am really getting my feet wet with perl modules and encountered this
>>error message
>>
>>Can't locate LWP/Socket.pm in @INC and then some paths
>>
>>I looked and that Socket.pm is in the path that it specifies, but I am
>>not sure how to make it work. Can someone show me or give me
>>someplace I can look to get more info?
>
>Well, Socket.pm may be in there, but is LWP/Socket.pm there? IOW,
>does one of those directories listed contain a directory named LWP,
>which in turn contains Socket.pm?
>
>--
> _____
>|/// | Brand Hilton bhilton@adc.com
>| ADC| ADC Telecommunications, ATM Transport Division
>|_____| Richardson, Texas
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4148
**************************************