[12419] in Perl-Users-Digest
Perl-Users Digest, Issue: 6019 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 16 15:07:28 1999
Date: Wed, 16 Jun 99 12:00:22 -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, 16 Jun 1999 Volume: 8 Number: 6019
Today's topics:
Re: a thread on threads <uri@sysarch.com>
Re: Afraid to ask about Y2K! <gellyfish@gellyfish.com>
Re: Afraid to ask about Y2K! (Greg Bacon)
Re: Asking for passwords and security (core dumps) (I R A Aggie)
Re: Fresh Newbie...Question <craig@mathworks.com>
Fun with STDERR... <portboy@home.com>
How to extract emails from Outlock Express <founder@pege.org>
Re: How to scan a directory and put all the files and t <dazimi@yahoo.com>
Re: installing modules <dscapin@harris.com>
Re: Is it better perl than awk ? <burton@lucent.com>
Re: Is it better perl than awk ? <burton@lucent.com>
Re: Is it better perl than awk ? <burton@lucent.com>
Re: Is it better perl than awk ? (Andrew Allen)
Re: message board with perl <cassell@mail.cor.epa.gov>
Re: MIcrosofts Attack on Perl (Cameron Laird)
Re: MIcrosofts Attack on Perl <steve.horne1@bridge.bst.bls.com>
Multidimensional Associative (hash) array jtubaugh@cftnet.com
my and interpolation? <nenad@halcyon.ca>
Re: my and interpolation? <craig@mathworks.com>
Re: my and interpolation? <emschwar@rmi.net>
Re: my and interpolation? <jcreed@cyclone.jprc.com>
Re: Need to know all programs that got called ... <rootbeer@redcat.com>
Re: Perl says "too many errors" but doesn't give me any (Bart Lateur)
Re: Practical Extraction and Report Language <dhenders@cpsgroup.com>
Re: Problems creating Text file. <flyboy1111@my-deja.com>
Re: Problems creating Text file. <Allan@due.net>
Re: saving uploaded file <uucon@my-deja.com>
Scripts Needed <mage@infi.net>
Re: Sourc to HTML with syntax-highlighting <rootbeer@redcat.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Jun 1999 14:56:39 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: a thread on threads
Message-Id: <x7iu8odleg.fsf@home.sysarch.com>
>>>>> "GB" == Greg Bartels <gbartels@xli.com> writes:
GB> Uri Guttman wrote:
>> i feel that his model is not clear enough to decide if threads are
>> warranted. as perl threads a not stable, that is a moot point so i was
>> pushing the fork solution.
GB> the model is this:
GB> I have many subroutines to run.
GB> I will call each one in sequence, controlling the order myself.
GB> when the subroutine calls MySleep, that sub needs to stop,
GB> set itself up to continue at a later time, and allow the next sub
GB> to be called.
GB> only in this last step does the idea of multiple processes become
GB> necessary. the subs dont run asyncronously, I do the switching
GB> from one sub to the other. even if I do use fork(), I would
GB> still set up controls so that only one child is doing anything
GB> at a time.
actually it sounds more like co-routines to me. since the ordering is
sequential, why have the subs sleep? why not have them keep a simple
state and return to the main loop. when they are rescheduled, they just
continue from the saved state. no threads or forks needed. in fact you
could do all of this with a single state machine which is easy to
implement with refs to subs and hash tables. just break up all your subs
so that where you would call sleep, store the next state (a code ref) so
that it can return there when scheduled. much easier to write and debug
than threads or forks.
i didn't understand the model before and now that is clear, the state
machine design seems like a perfect answer.
if you want more help with that design, let me know.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 15 Jun 1999 22:20:12 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k6jis$3v2$1@gellyfish.btinternet.com>
On 15 Jun 1999 17:27:13 GMT Mitchell Morris wrote:
>
> If you don't see this distinction, and that it is a significant distinction,
> then your "professionalism" is rather more like "malfeasance" in my
> opinion.
I'll see your 'malfeasance' and raise you a glossolalia ...
(I just had to get that word into this thread :)
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 16 Jun 1999 18:58:58 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k8s5i$m80$3@info2.uah.edu>
In article <7k8das$3ep$1@brokaw.wa.com>,
jeromeo@atrieva.com (Jerome O'Neil) writes:
: > "The power of accurate observation is commonly called [pedantry] by
: > those who have not got it."
:
: Spoken like a true pedant.
"When a man is more right than his neighbor, that constitutes a
majority of one."
-- Thoreau
Greg
--
PC Bulletin: Henceforth, sentient computers would like to be known as
'Silicon Intelligences.' 'Artificial Intelligence' is a pejorative term
invented by humans based on the mistaken belief that computers are somehow not
'natural.' -- Elf Sternberg
------------------------------
Date: 16 Jun 1999 18:26:11 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Asking for passwords and security (core dumps)
Message-Id: <slrn7mfr8c.273.fl_aggie@thepentagon.com>
On 16 Jun 1999 17:35:38 GMT, Andrew Allen <ada@fc.hp.com>, in
<7k8n9a$7st$5@fcnews.fc.hp.com> wrote:
+ And digging through a core file is easy?
Try 'strings core | less' some time...
James - replace 'core' with any binary file...
------------------------------
Date: Wed, 16 Jun 1999 14:15:42 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Fresh Newbie...Question
Message-Id: <3767E9CD.D432C816@mathworks.com>
Perhaps this will help:
#!/usr/local/bin/perl -w
@array_of_arrays = ( [ "FOO", "BAR" ],
[ "BLETCH", "BIFF" ]
);
# print a single member of an array
print $array_of_arrays[0][0] . "\n";
print $array_of_arrays[1][0] . "\n";
# print each value
foreach $member ( @array_of_arrays ) {
foreach $value ( @{$member} ) {
print $value . "\n";
}
}
Franklin Edward Sadler wrote:
> Ok...First off Im a newbie at PERL (started yesterday). My question is how
> do u access double arrays??? Like $array[a,b]; or $array[a][b]; or
> neither???
> My array basically consists of records that themselves are also arrays.If
> someone could please give me the correct format I would certainly
> appreciate it. Also, what if had an array of records that held lists, how
> would I go about accessing something in the list of any record? Thanx...
>
> --
> M U S T A N G Z !
> Franklin Edward Sadler
> Georgia Institute of Technology, Atlanta Georgia, 30332
> Email: gte482i@prism.gatech.edu
------------------------------
Date: Wed, 16 Jun 1999 18:32:31 GMT
From: Mitch <portboy@home.com>
Subject: Fun with STDERR...
Message-Id: <37677DE0.B106701C@home.com>
I'm making a call to ifconfig with an interface number (pp0 pp1 exp0),
and should any interfaces not be there when ifconfig is called with
$parm it will typically return to stderr:
ifconfig: no such interface: pp0.
Okay, that's cool...however, I don't want to see this message - I want
it sent to $output where I can parse it and return to the user a more
appropriate message...
Here is one of my many attempts:
my $output;
$output = open(IFCONFIG, "/sbin/ifconfig $parm 2>&1
1>/dev/null");
So, how do I grab the stderr output, and not have it echo'd to the
user? All methods tried so far have failed.
Thanks in advance,
.mitch
------------------------------
Date: Wed, 16 Jun 1999 20:18:10 +0200
From: "Mosl Roland" <founder@pege.org>
Subject: How to extract emails from Outlock Express
Message-Id: <7k8qsm$3pe$1@orudios.magnet.at>
I would like to extract all emails from
Outlock Express 5 and store the
messages in an own database system.
First step: how to extract from the
Outlock Express files?
--
Mosl Roland - http://www.pege.org
clear targets for a confused civilization
------------------------------
Date: Wed, 16 Jun 1999 14:38:45 -0400
From: "Dariush_news" <dazimi@yahoo.com>
Subject: Re: How to scan a directory and put all the files and their size to a text file
Message-Id: <7k8r43$a7g$1@clio.net.metrotor.on.ca>
First of all, I like to thank You all for your greate support and help.
I have the script now running ok.
Special Thanks to Lauren Smith <laurens@bsqaure.com>
The currently working program is at the end of massage.
Thank you all
This programm is in 3 parts (just because I did not know how to run all of
them from the same script)
programm (1):
#Thanks to Lauren Smith
#!/usr/bin/perl -w
use strict;
open(OUT,">out.txt") || die "Cant open out.txt - $!\n";
system ("dir /a-d > upfiles.txt");
open (INFILE, "upfiles.txt");
open (OUT, ">uplist.txt");
while (<INFILE>)
{
if (/^\s/)
{
next;
}
else
{
/^.{17}(.*)/;
print OUT "$1\n";
}
}
Programm 2:
#File: Chfiles.pl
# Dariush Azimi
# Date : June 16/1999
#Captures output of the dir command and
#presents a differently formatted list
#Define format of output report
open(INFILE, "uplist.txt") || die "Input file not there";
open(Exlist, ">uplist2.txt") || die "I can not open the uplist2.txt for
input";
@files=<INFILE>;
for $lines(@files)
{
$filesize=substr($lines,14,7);
$filename=substr($lines,22,10);
print Exlist "$filesize , $filename\n";
}
Programm 3:
# File: Excellist.pl
# Runs the Excel and loads the Listed of files to
# a spreadsheet.
#Dariush Azimi June 16/1999
# Usage: Perl Excellist.pl
use OLE;
# create an excell object
$app = CreateObject OLE 'Excel.Application' || die ("I can't create the
excell app for you");
# make the excel application visible.
$app->{'Visible'} = 1;
# Add a new worksheet
$workbook = $app->Workbooks->Add();
$worksheet = $workbook->Worksheets(1);
# Define the column Headers
$worksheet->Range("A1:B1")->{'Value'} = ["File size", " File name"];
$row = 1;
while(<>)
{
chomp;
($fsize, $fname) = split(/\ , /, $_);
$row++;
$worksheet->Range("A".$row.":B".$row)->{'Value'} = [$fsize, $fname];
}
Now I finnally have a excell spreadsheet.
But every day I must generate a same file, however I don't want to overwrite
the old file, since I must keep a history of every day file list.
So How can I load every day's file to a different sheet on the same excell
spreadsheet file.
i.e. Sheet one would show the list of files uploaded today and tomorrow's
list would go to the next sheet.
The way I have that now , everytime I run the programm, it overwrites the
old one.,
------------------------------
Date: Wed, 16 Jun 1999 13:32:02 -0400
From: Deamon George Scapin <dscapin@harris.com>
Subject: Re: installing modules
Message-Id: <3767DF92.7EFF0A3C@harris.com>
I solved that problem too. Looks like it had to do with the Sambar4.2 settings. I
just changed which perl.exe the server software uses when interpreting perl scripts...
George
------------------------------
Date: Wed, 16 Jun 1999 13:36:14 -0500
From: Burton Kent <burton@lucent.com>
To: Lee <rlb@intrinsix.ca>
Subject: Re: Is it better perl than awk ?
Message-Id: <3767EE9E.2F606CFD@lucent.com>
>
> PL/I ranks among the top five favourite languages I've worked in, just
> below Perl, Lisp, Smalltalk and Icon.
>
> At the very bottom of the list lies C. Guess what language I have to work
> in daily? <sigh!> Bad karma sucks.
>
> Lee
Who said you have to keep the karma? Trade it
in for a better one. ;-)
B
------------------------------
Date: Wed, 16 Jun 1999 13:35:58 -0500
From: Burton Kent <burton@lucent.com>
To: Lee <rlb@intrinsix.ca>
Subject: Re: Is it better perl than awk ?
Message-Id: <3767EE8E.FFC3A0FD@lucent.com>
>
> PL/I ranks among the top five favourite languages I've worked in, just
> below Perl, Lisp, Smalltalk and Icon.
>
> At the very bottom of the list lies C. Guess what language I have to work
> in daily? <sigh!> Bad karma sucks.
>
> Lee
Who said you have to keep the karma? Trade it
in for a better one. ;-)
B
------------------------------
Date: Wed, 16 Jun 1999 13:36:39 -0500
From: Burton Kent <burton@lucent.com>
Subject: Re: Is it better perl than awk ?
Message-Id: <3767EEB7.D41371B@lucent.com>
>
> PL/I ranks among the top five favourite languages I've worked in, just
> below Perl, Lisp, Smalltalk and Icon.
>
> At the very bottom of the list lies C. Guess what language I have to work
> in daily? <sigh!> Bad karma sucks.
>
> Lee
Who said you have to keep the karma? Trade it
in for a better one. ;-)
B
------------------------------
Date: 16 Jun 1999 18:50:15 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Is it better perl than awk ?
Message-Id: <7k8rl7$a3r$1@fcnews.fc.hp.com>
Lee (rlb@intrinsix.ca) wrote:
: At the very bottom of the list lies C.
I guess you've never programmed in Ada.
Andrew
------------------------------
Date: Wed, 16 Jun 1999 11:38:26 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: message board with perl
Message-Id: <3767EF22.551E852C@mail.cor.epa.gov>
baga@gmx.net wrote:
>
> I want to write a meassage board for a friend (he has already one but
> that isn't aggod solution). He wants to have some features like
> searching (e.g. author) through the articles etc. As there is much
> traffic I think of using a database (does someone know a good small
> database for simple functions when possible for free? I use a linux
> system).
> Before I want to start programming I want to ask if someone knows
> solutions in perl that can be used as start? (I have to say that I
> normally program with C but as I started with perl I 'm really
> fascinated by it).
If you search the web, you'll find a ton of Perl message board
programs that you could use as templates. But be forewarned:
many of them have, umm, how can I put this... Code you would
not want to emulate. So be on your guard.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 16 Jun 1999 13:06:27 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <7k8p33$hbj$1@Starbase.NeoSoft.COM>
In article <3767DAD1.A64A7D1E@bridge.bst.bls.com>,
Steve Horne <steve.horne1@bridge.bst.bls.com> wrote:
>Cameron Laird wrote:
>>
>> Now, what "C++" means, as least at the business level
>> defined by recruiters and managers, is "the latest
>> MS VC++". VC++ is poorly compatible between versions,
>
>I just wanted to make the comment that _many_ of us working on
>mission-critical "real" business applications develop in C++ on a Unix
>platform (myself on HP-UX, AIX and Solaris).
>
>As an active participant in the interview/evaluation process, I view
>past experience with VC++ differently than straight C++ experience. Due
>to MS VC++'s GUI drag-and-drop "programming", experience with VC++
>counts for less than equivalent work done with the actual language
>itself.
>
>I'm not saying that we don't hire people w/VC++ experience, but when
>considering previous experience, VC++ usually has less weight than
>development on other platforms. Plus, as far as your comment above,
>most managers in my type of environment couldn't care less about "the
>latest MS VC++".
>
>-Steve
Exactly! I should have written "... defined by the
majority of recruiters ..." Your observations are
*precisely* what I intended to describe--the meaning
of "C++" has bifurcated in different work environments.
--
Cameron Laird http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com +1 281 996 8546 FAX
------------------------------
Date: Wed, 16 Jun 1999 13:21:15 -0500
From: Steve Horne <steve.horne1@bridge.bst.bls.com>
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <3767EB1B.17EDD666@bridge.bst.bls.com>
Cameron Laird wrote:
>
> Exactly! I should have written "... defined by the
> majority of recruiters ..." Your observations are
> *precisely* what I intended to describe--the meaning
> of "C++" has bifurcated in different work environments.
Yes, I agree. It has always been an unfortunate aspect of this (and any
technical) industry, in that the managers and recruiters and people who
are ancillary to the technical side of software development simply don't
understand the nuances of these kinds of issues. It is up to us to
remind them.
Given an choice, I would hire someone who brings a clear, demonstrated
knowledge of how say, multiple inheritance works (for example) over
someone that had tons of experience pushing buttons in VC++ any day.
-Steve
------------------------------
Date: Wed, 16 Jun 1999 17:49:21 GMT
From: jtubaugh@cftnet.com
Subject: Multidimensional Associative (hash) array
Message-Id: <7k8o2s$quu$1@nnrp1.deja.com>
Does anybody know of a way to store a hash array within another hash
array?
What I want to do is define a hash array like this:
%ARRAY1 = ("key1","value1", "key2","value2");
Then store it in a second array:
%ARRAY2 = ("key1", %ARRAY1);
Each row in %ARRAY2 will have different values set for %ARRAY1.
Then when I reference %ARRAY2, I can pull out the information for
%ARRAY1.
Basically what I am trying to do is create a multidimensional
associative array.
Any help would be appreciated.
Thanks.
Jeff
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 14:10:54 -0400
From: Nenad Vidovic <nenad@halcyon.ca>
Subject: my and interpolation?
Message-Id: <3767E8AC.C800E851@halcyon.ca>
Hi!
So I have this and it works:
$compression = "gz";
$file_size_gz = "3";
$file_size = ${"file_size_$compression"};
print "$file_size\n";
However this does not:
$compression = "gz";
my $file_size_gz = "3";
$file_size = ${"file_size_$compression"}
print "$file_size\n";
Anybody have any ideas why this doesn't work. Thanks for helping out?
--
Regards,
==========================================================
Nenad Vidovic Halcyon Inc.
nenad@halcyon.ca http://www.halcyon.ca
==========================================================
------------------------------
Date: Wed, 16 Jun 1999 14:25:59 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: my and interpolation?
Message-Id: <3767EC36.26C580@mathworks.com>
In the second example you are missing a semi-colon:
$file_size = ${"file_size_$compression"}
should be
$file_size = ${"file_size_$compression"};
Craig
>
------------------------------
Date: 16 Jun 1999 12:39:37 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: my and interpolation?
Message-Id: <xkfk8t4kn12.fsf@valdemar.col.hp.com>
Nenad Vidovic <nenad@halcyon.ca> writes:
> However this does not:
>
> $compression = "gz";
> my $file_size_gz = "3";
> $file_size = ${"file_size_$compression"}
> print "$file_size\n";
>
> Anybody have any ideas why this doesn't work. Thanks for helping out?
Because you're trying to do symbolic references, which are Very Very
Bad(tm). One of their major failings is that they only work on package
variables, so variables declared with "my", which are lexical, can't be
referred to in this manner.
The Right Way(tm) is to use a hash:
$compression = 'gz'; # don't use double-quotes unless you're trying to
# interpolate
$file_size = $file_compress{$compression};
print "$file_size\n";
Cue TomC's screed on symrefs, or better yet, search Deja.com for it, and
save him the trouble.
-=Eric
------------------------------
Date: 16 Jun 1999 14:37:28 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: my and interpolation?
Message-Id: <a1hfo8m1p3.fsf@cyclone.jprc.com>
> However this does not:
>
> $compression = "gz";
> my $file_size_gz = "3";
> $file_size = ${"file_size_$compression"}
> print "$file_size\n";
>
> Anybody have any ideas why this doesn't work. Thanks for helping out?
You're using a symbolic reference, and my variables are lexically
scoped, ie not in the symbol table. You probably don't really
want to use symbolic references, anyway.
---Jason
------------------------------
Date: Wed, 16 Jun 1999 11:24:54 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Need to know all programs that got called ...
Message-Id: <Pine.GSO.4.02A.9906161117560.26850-100000@user1.teleport.com>
On Wed, 16 Jun 1999 hychung@my-deja.com wrote:
> By clicking on a hyperlink on a web page, I know that a certain Perl
> script gets executed. However, due to the complex behind-the-scene
> processing, many other Perl programs/modules/subroutines also got
> called. How do I print to myself an audit trail file that tells me
> what programs/modules/subroutines have been executed and the order of
> their execution?
You know not what you ask.
You may want to use some of the methods from the perldebug manpage to get
at some of this information, _if_ you really need it that badly. If your
main program is calling other programs which you want to trace, things get
even more interesting. Also, if you want this to run when the program is
accessed over the web, that's yet more excitement. Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 16 Jun 1999 18:40:16 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl says "too many errors" but doesn't give me any
Message-Id: <3767eee5.1097731@news.skynet.be>
Ken Causey wrote:
>For some reason however, I'm getting a
>strange error situation where perl bombs with "contents.pl has
>too many errors." but I get absolutely no error messages.
>"contents.pl" is one of the "require"d files by the way.
Have you tried to test compile just that library file?
perl -wc contents.pl
That should tell you all you need to know. Do the same with all other
library files, and only try to run the whole script only after all this
worked out alright.
HTH,
Bart.
------------------------------
Date: 16 Jun 1999 12:55:26 -0500
From: Dale Henderson <dhenders@cpsgroup.com>
Subject: Re: Practical Extraction and Report Language
Message-Id: <874sk8yqr5.fsf@camel.cpsgroup.com>
>>>>> "Fred" == Fred Ruffet <fruffet@kaptech.com> writes:
Fred> Hi, everybody I need to write a small paper ON (not in)
Fred> perl. I've searched for many information, but all I obtained
Fred> was the (a) meaning of "perl" which his the subject of this
Fred> message. I would like to ask a question : When is perl born
Fred> ? a year would be enough, but if anybody knows of a precise
Fred> hour when the light came on Larry Wall... :-)
Fred> I would appreciate any more information about perl creation
Fred> and things like that (Not a lot of things, I don't want all
Fred> of your time).
Fred> Thanks for any answer,
There is a little about the history of Perl in the back of
Programming Perl. But the same info might be in perlhist.
Not sure.
Besides its Pathelogically Eclectic Rubbish Lister. :)
------------------------------
Date: Wed, 16 Jun 1999 17:14:35 GMT
From: FlyBoy <flyboy1111@my-deja.com>
Subject: Re: Problems creating Text file.
Message-Id: <7k8m1g$q37$1@nnrp1.deja.com>
ate you sure $dataname will work on NT unix and NT filenames are
different.. are you sure that the full path exists, etc..? i would try
to replace $dataname with something really simple, like "C:\test.file"
and see if that works...
In article <FDFFJw.DBM@news.boeing.com>,
"news.boeing.com" <jim.ray@west.boeing.com> wrote:
> I am converting my UNIX PERL to NT. I am using IIS4 and all the data
files
> are on the same area. For some reason my OPEN staement does not work
> anymore. Her eis the code
>
> open(CONFG, ">$dataname");
> foreach $arg(@Save)
>
> print CONFG ("$arg");
> }
>
> PERL goes through the motions of writing the file, but the file never
gets
> created. Am I missing some here> I am using Activestate PERL 5.3, NT
4.0
> sp5 with IIS4.
>
> Thank you for the help.
>
> --
> Jim Ray
> Delta Program NT Administrator
> The Boeing Company
> 714-896-2038
> jim.ray@west.boeing.com
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 14:42:05 -0400
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Problems creating Text file.
Message-Id: <7k8r1a$ccf$1@nntp8.atl.mindspring.net>
FlyBoy wrote in message <7k8m1g$q37$1@nnrp1.deja.com>...
:ate you sure $dataname will work on NT unix and NT filenames are
:different.. are you sure that the full path exists, etc..? i would try
:to replace $dataname with something really simple, like "C:\test.file"
:and see if that works...
You do know what you are suggesting don't you? By using double quotes you
are escaping that t, not what I think you mean to do. Suggesting
'C:\test.file' or "C:/test.file" might have been more helpful.
Even more helpful would have been to suggest he check the result of his
open:
open(CONFG, ">$dataname") or die $!;
then perl could let him know what if, anything, had gone wrong.
HTH
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
'Out, out brief candle!
Life's but a walking shadow,
a poor player, that struts and frets his hour upon the stage,
And then is heard no more; It is a tale, told by an idiot,
full of sound and fury, signifying nothing'
- MacBeth
------------------------------
Date: Wed, 16 Jun 1999 17:15:09 GMT
From: Ryan Corder <uucon@my-deja.com>
Subject: Re: saving uploaded file
Message-Id: <7k8m2i$q3a$1@nnrp1.deja.com>
ok, maybe i should have asked that first, i know how to get the filename
with the path by using:
$filename = $query->param('image');
Now, how do i strip the path from $filename so i can specify the file to be
saved in a specific directory?
Thanks
ryan
In article <3767c81c@newsread3.dircon.co.uk>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> Ryan Corder <uucon@my-deja.com> wrote:
> > In article <slrn7mdvrk.hd.efflandt@efflandt.xnet.com>,
> > efflandt@xnet.com wrote:
> >> On Tue, 15 Jun 1999 22:05:13 GMT, Ryan Corder <uucon@my-deja.com> wrote:
> >> >ok, following the advice of the newsgroup community, i have managed to
> >> >configure my script with CGI.pm so that a user can upload a file. Now, how
> >> >do i save the file in a particular dir. I want to be able to save the
> >> >uploaded image in: /home/<username>/images here is the code i used to read
> >> >the filename and the MIME type so that users can only upload images:
> >>
> >> If the script is not running suid as the user, make sure that the images
> >> directory has 777 permission (747 or 707 might work). Other than that,
> >> follow the instructions in CGI.pm.
> >>
>
> > Doesn't CGI.pm show you how to save a file with a specific filename
> > though? i need to save it in their images subdir with the name they
> > supplied.
> >
>
> What part of the example given in the documentation for CGI.pm are you
> having trouble with ?
>
> The filename returned is also a file handle. You can read the contents
> of the file using standard Perl file reading calls:
>
> The filename will have the full path to the uploaded file so you will need
> to strip the directory path from it if you are going to save in a directory
> of your choice.
>
> /J\
> --
> "Childbirth is god's way of telling you that heterosexuality isn't
> natural. It's got to be easier to get a penis up your arse than a baby
> out of your vagina" - Graham Norton
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 13:47:05 -0400
From: "Ky Luong" <mage@infi.net>
Subject: Scripts Needed
Message-Id: <7k8o4a$hap$1@nw003t.infi.net>
http://www.gunowners.org/mailerx.html
Do anyone know where I can get a script like that from the above link?
------------------------------
Date: Wed, 16 Jun 1999 11:13:35 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Sourc to HTML with syntax-highlighting
Message-Id: <Pine.GSO.4.02A.9906161113020.26850-100000@user1.teleport.com>
On Wed, 16 Jun 1999, Martin wrote:
> I'm lazy and someone HAS to have made this...
> (it's just that i can't find it)
> What i'm looking for is a script
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: 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 6019
**************************************