[19052] in Perl-Users-Digest
Perl-Users Digest, Issue: 1247 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 5 00:05:32 2001
Date: Wed, 4 Jul 2001 21:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <994305908-v10-i1247@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 4 Jul 2001 Volume: 10 Number: 1247
Today's topics:
Re: changing hash dynamically <william-news-102374@scissor.com>
Re: Chmod and File::Find (Tad M) <william-news-102374@scissor.com>
Re: clean up an array of references from references whi <godzilla@stomp.stomp.tokyo>
Re: clean up an array of references from references whi <abrice2@home.com>
Re: clean up an array of references from references whi <godzilla@stomp.stomp.tokyo>
clean up an array of references from references which a (Alexvalara)
Re: clean up array from "holes"... (Martien Verbruggen)
Re: Date Subtraction Routine (Steve)
Re: Date Subtraction Routine <mbudash@sonic.net>
Re: FAQ 9.4: How do I extract URLs? (BUCK NAKED1)
Help with pop-up problem <horizons@fastbytes.com>
Re: Help with pop-up problem <tony_curtis32@yahoo.com>
Re: how to use pod::html and pod::text (E.Chang)
Keen, experienced, or improving Perl author required <tailorontap@pantsbtinternet.com>
Re: Net::Telnet logging on problem..... <r1ckey@home.com>
Re: Off topic (somewhat) - No - Extremely! <wyzelli@yahoo.com>
Re: Off topic (somewhat) - No - Extremely! <C@TFISH.NET>
Re: Off topic (somewhat) - No - Extremely! <tony_curtis32@yahoo.com>
Off topic (somewhat) <C@TFISH.NET>
Re: Passing Variables to a Javascript from a Perl CGI s <ron@savage.net.au>
Re: Request Advice for Proper Case of String (Craig Berry)
Re: Request Advice for Proper Case of String <jc_va@spamisnotcool.hotmail.com>
Re: Request Advice for Proper Case of String <godzilla@stomp.stomp.tokyo>
Re: Request Advice for Proper Case of String <mbudash@sonic.net>
Sendmail <alex82p@svs.ru>
Re: Sendmail (Clinton A. Pierce)
Re: Text based menuing system in Perl with submenus??? <ron@savage.net.au>
Re: web fetching (BUCK NAKED1)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 4 Jul 2001 19:29:38 -0700
From: William Pietri <william-news-102374@scissor.com>
Subject: Re: changing hash dynamically
Message-Id: <tk7k8jcvudda5b@corp.supernews.com>
Umair Tariq Bajwa wrote:
>
> Philip Newton wrote:
>
>>
>> my(@info);
>>
>> my $counter = 0;
>>
>> foreach my $parameter (@paramlist)
>> {
>> if ($parameter =~ /employee_id$counter/)
>> {
>> $counter++;
>> }
>>
>> $info[$counter]{$parameter} = param($parameter);
>> }
>
> How can i print the values if i am using autovivification? I have an @info
> and at each index i have reference to hash? I am trying to do it but it
> won't work? Need some help
>
Howdy, Umair; forgive me for rearranging your message, but it's a usenet
tradition to put the responses in at the end. That way the messages make
sense when read through from the beginning.
If you need to print out the contents of @info, you could do it like this:
foreach my $hash (@info) {
foreach my $key (keys(%{$hash})) {
print "$key\t",${$hash}{$key},"\n";
}
}
Or if you need to keep track of which parameter goes with which counter and
wanted to be a little safer, then you could do it like this:
# loop through @info array
foreach my $index (0..$#info) {
# make sure we have a hash; print header
if (ref($info[$index]) eq "HASH") {
print "info $index contains:\n";
} else {
print "info $index isn't a hash.\n";
next;
}
# loop through hash and print
foreach my $key (keys(%{$info[$index]})) {
print "\t$key\t", ${$info[$index]}{$key},"\n";
}
}
Hope that helps!
William
------------------------------
Date: Wed, 4 Jul 2001 20:52:05 -0700
From: William Pietri <william-news-102374@scissor.com>
Subject: Re: Chmod and File::Find (Tad M)
Message-Id: <tk7p361a551q9e@corp.supernews.com>
BUCK NAKED1 wrote:
> Thanks alot for your suggestions.
No problem. Note that it's easier for those following your efforts if you
keep messages in the same thread. The easiest way to do that is just to
reply to your original message or, better, to one of the replies to that.
> I'm still not sure what "return" does.
Return leaves a subroutine right away.
> Anyway, how'd I do?
>
> use File::Find;
>
> # Delete illegal characters and spaces in filename in $tmpdir
>
> find sub {
> -f or return;
> my $new = s/\`| |\~|\'|\"|\^|\#|\@|\$|\+|\=|\,//g;
> rename $_, $new or print "Could not delete illegal chars: $!<BR>\n";
> },
> $tmpdir ;
>
>
> # Change all .exe files in $tmpdir to .exe.txt and chmod to 644
>
> find sub {
> -f or return;
> if ( (my $new = $_) =~ s/\.exe$/\.exe\.txt/ig ) {
> rename $_, $new or print "Could not rename file to exe.txt: $!<BR>\n";
> chmod 0644, $new or print "Could not chmod $_: $!<BR>\n";
> }
> }, $tmpdir ;
>
>
> # chmod all files in $tmpdir to 644
>
> find sub {
> -f or return;
> chmod 0644, $_ or print "Could not chmod $_: $!<BR>\n";
> }, $tmpdir ;
This should work, but it's a little opaque for my tastes. If this is just a
little script you're maintaining yourself, that's fine; if you may want
others to work on it eventually, you might make it more clear by doing
something more like this:
[...]
# fix the files in $tmpdir
find \&fix_temp_files, $tmpdir;
[...]
sub fix_temp_files {
my $file = $_;
# skip anything but a plain file
return unless -f $file;
# now do the work
fix_perms($file);
fix_illegal_chars($file);
textify_exes($file);
}
sub fix_perms {
my ($file) = @_;
chmod 0644, $file or
handle_error($file,"couldn't chmod to 0644",$!);
}
sub fix_illegal_chars {
my ($file) = @_;
my $newname = $file;
return unless $newname =~ tr/-._A-Za-z0-9/_/c;
safe_rename($file, $newname);
}
sub textify_exes {
my ($file) = @_;
my $newname = $file;
return unless $newname =~ s/\.exe$/.exe.txt/i;
safe_rename($file, $newname);
}
sub safe_rename {
my ($oldfile, $newfile) = @_;
return if ($oldfile eq $newfile);
if (-f $newfile) {
handle_error($oldfile,"file " . $newfile ." already exists");
return;
}
rename $oldfile, $newfile or
handle_error($oldfile,"couldn't rename to ".$newfile,$!);
}
sub handle_error {
my ($file, $message, $syserror) = @_;
print "$file: <b>$message</b>";
print " ($syserror)" if $syserror;
print "<br>\n";
# and log it, too?
}
This does pretty much the same stuff, except 1) it goes through the
directory tree only once, so it will be faster, 2) it nixes more bad
characters, and 3) it won't clobber existing files when renaming.
It should also be much easier to maintain, as the code is broken up into
bitesize chunks and fewer things are done implicitly. Also, there's less
repeated code; that way if you want to, say, change the format of all the
error messages at once, you just have to change one line.
> Hope everyone's having a great 4th!
Likewise! Between a barbecue and fireworks, I couldn't resist doing a
little perl. Mmmmmm, perl.
William
------------------------------
Date: Wed, 04 Jul 2001 17:23:28 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: clean up an array of references from references which are pointing into empty arrays
Message-Id: <3B43B380.8D7ED0AB@stomp.stomp.tokyo>
Alexvalara wrote:
> the problem now is that having an array of arrays you want to get
> rid of empty arrays of the array!
You want to do this. I do not.
Your use of "that" in your sentence causes
me to gnash my English teacher teeth.
Tell me, why would you "get" then "rid" something?
Rather oxymoronic, don't you think?
> For example, you have something like
> @a=(\@b,\@c,\@d...) where \@c=("")
> and you want to come up with an arrayof the following form
> (\@b,\@d...).
I do not have "something like" that. You do.
You want to do this. I do not.
> Any suggestions...?
A suggestion would be to write code of your own,
then ask for help if needed. Show some effort.
Laziness is not well accepted within this group,
least not by me, no more than trolls are accepted,
again, least by me.
I personally have provided you with more than
enough information to accomplish this in prior
articles, for which, I have received no
acknowledgement from you and, clearly, you
have invested zero effort to adapt.
Godzilla! Queen Of Semantic Guerrillas.
--
TEST SCRIPT:
____________
#!perl
print "Content-type: text/plain\n\n";
@Array_A = (1, 2, 3);
@Array_B = (4, 5, 6);
@Array_C = ();
@Array_D = (7, 8, 9);
@Array_E = (\@Array_A, \@Array_B, \@Array_C, \@Array_D);
print "Control: @Array_E\n\n";
foreach $reference (@Array_E)
{
$non_null = shift (@Array_E);
if ($#{ $non_null } > -1)
{ push (@Array_E, $non_null); }
}
print "First Results: @Array_E)\n\n";
@Array_E = sort (@Array_E);
print "Final Results: @Array_E\n\n";
exit;
PRINTED RESULTS:
________________
Control: ARRAY(0x1a62644) ARRAY(0x1a626a4) ARRAY(0x1a62704) ARRAY(0x1a62740)
First Results: ARRAY(0x1a62740) ARRAY(0x1a62644) ARRAY(0x1a626a4))
Final Results: ARRAY(0x1a62644) ARRAY(0x1a626a4) ARRAY(0x1a62740)
------------------------------
Date: Thu, 05 Jul 2001 01:25:43 GMT
From: Aaron Brice <abrice2@home.com>
Subject: Re: clean up an array of references from references which are pointing into empty arrays
Message-Id: <3B43C310.A16D2F6A@home.com>
Pardon me, Captain Pretentious, but the guy signs his name as "Alexandros" and
his organization is www.aol.co.uk. Why do you assume he was born and raised in
an English speaking country? How's your German, for example? I think you were
looking for the english.lang.anal.rententive newsgroup.
I was, by the way, born and raised in the US. So feel free to flame my grammar,
if that will make you feel superior.
"Godzilla!" wrote:
> Alexvalara wrote:
>
> > the problem now is that having an array of arrays you want to get
> > rid of empty arrays of the array!
>
> You want to do this. I do not.
>
> Your use of "that" in your sentence causes
> me to gnash my English teacher teeth.
>
> Tell me, why would you "get" then "rid" something?
> Rather oxymoronic, don't you think?
>
> > For example, you have something like
> > @a=(\@b,\@c,\@d...) where \@c=("")
> > and you want to come up with an arrayof the following form
> > (\@b,\@d...).
>
> I do not have "something like" that. You do.
> You want to do this. I do not.
>
>
> > Any suggestions...?
>
> A suggestion would be to write code of your own,
> then ask for help if needed. Show some effort.
> Laziness is not well accepted within this group,
> least not by me, no more than trolls are accepted,
> again, least by me.
>
> I personally have provided you with more than
> enough information to accomplish this in prior
> articles, for which, I have received no
> acknowledgement from you and, clearly, you
> have invested zero effort to adapt.
>
> Godzilla! Queen Of Semantic Guerrillas.
> --
>
> TEST SCRIPT:
> ____________
>
> #!perl
>
> print "Content-type: text/plain\n\n";
>
> @Array_A = (1, 2, 3);
> @Array_B = (4, 5, 6);
> @Array_C = ();
> @Array_D = (7, 8, 9);
>
> @Array_E = (\@Array_A, \@Array_B, \@Array_C, \@Array_D);
>
> print "Control: @Array_E\n\n";
>
> foreach $reference (@Array_E)
> {
> $non_null = shift (@Array_E);
> if ($#{ $non_null } > -1)
> { push (@Array_E, $non_null); }
> }
>
> print "First Results: @Array_E)\n\n";
>
> @Array_E = sort (@Array_E);
>
> print "Final Results: @Array_E\n\n";
>
> exit;
>
> PRINTED RESULTS:
> ________________
>
> Control: ARRAY(0x1a62644) ARRAY(0x1a626a4) ARRAY(0x1a62704) ARRAY(0x1a62740)
>
> First Results: ARRAY(0x1a62740) ARRAY(0x1a62644) ARRAY(0x1a626a4))
>
> Final Results: ARRAY(0x1a62644) ARRAY(0x1a626a4) ARRAY(0x1a62740)
------------------------------
Date: Wed, 04 Jul 2001 19:35:22 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: clean up an array of references from references which are pointing into empty arrays
Message-Id: <3B43D26A.FE097690@stomp.stomp.tokyo>
Aaron Brice wrote:
> Pardon me, Captain Pretentious, but the guy signs his name as "Alexandros" and
> his organization is www.aol.co.uk. Why do you assume he was born and raised in
> an English speaking country? How's your German, for example? I think you were
> looking for the english.lang.anal.rententive newsgroup.
> I was, by the way, born and raised in the US. So feel free to flame my grammar,
> if that will make you feel superior.
My goodness, what a lame troll!
I do not feel superior. I am superior, especially intellectually.
Godzilla!
------------------------------
Date: 04 Jul 2001 22:27:43 GMT
From: alexvalara@aol.com (Alexvalara)
Subject: clean up an array of references from references which are pointing into empty arrays
Message-Id: <20010704182743.29357.00001584@ng-co1.aol.com>
Hi everyone,...
the problem now is that having an array of arrays you want to get rid of empty
arrays of the array!
For example, you have something like @a=(\@b,\@c,\@d...) where \@c=("") and you
want to come up with an arrayof the following form (\@b,\@d...).
Any suggestions...?
Thank you in advance
Alexandros
------------------------------
Date: Thu, 05 Jul 2001 02:29:42 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: clean up array from "holes"...
Message-Id: <slrn9k7k8m.4ot.mgjv@verbruggen.comdyn.com.au>
On 4 Jul 2001 16:56:18 GMT,
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> According to Tom Melly <tom.melly@ccl.com>:
>> "Alexvalara" <alexvalara@aol.com> wrote in message
>> news:20010704121010.02822.00000077@ng-bg1.aol.com...
>> > Hi everyone,
>> > Is it possible to get rid off "holes" in an array...
>> > for example: i have something that looks like
>> > ($ref1,$ref2,"",$ref3,"",$ref4,"","") and i want to transform it into
>> > ($ref1,$ref2,$ref3,$ref4).
>> >
>>
>> How about:
>>
>> @array = ("", "hello", "", "goodbye");
>> foreach(@array){
>> push @array2, $_ if $_;
>> }
>> @array = @array2;
>
> This is what the grep function is for:
>
> @array = grep length, @array;
And if some of your elements may actually be undefined, and you don't
like warnings:
@array = grep { defined && length } @array;
Martien
--
Martien Verbruggen |
Interactive Media Division | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 4 Jul 2001 23:13:58 GMT
From: steve@zeropps.uklinux.net (Steve)
Subject: Re: Date Subtraction Routine
Message-Id: <slrn9k78l1.9qt.steve@zero-pps.localdomain>
On Wed, 04 Jul 2001 21:35:49 GMT, David Mohorn wrote:
>I need a way to calculate a previous date from a start date. For example,
>if I want to get the date 7 days for today, I need something like "Today -
>7" and it will give me the date a week ago. Of course, I need the date in
>MM/DD/YYYY format.
It's not 100% in the format that you wanted, but that can be achieved,
you could have a hash that holds the months and do a conversion, or use
tge Date::Calc module, but if it's just for the one use I'd forgo the module
and just have my own hash like:
my %Months_Look_Up = ("Jan","1","Feb","2","Mar","3","Apr","4","May","5",
"Jun","6","Jul","7","Aug","8","Sep","9","Oct","10",
"Nov","11","Dec","12");
Script below without using the month lookup:
#!/usr/bin/perl -w
use strict;
my $A_Week_Past = time() - ( (24*7) * 60 * 60 );
my $One_Week_ago = localtime($A_Week_Past);
my @Today_In_Bits = split/\s+/, $One_Week_ago;
my $Seven_Days_Ago = "$Today_In_Bits[0] $Today_In_Bits[2] ".
"$Today_In_Bits[1] $Today_In_Bits[4]";
print "$Seven_Days_Ago\n";
--
Cheers
Steve email mailto:steve@zeropps.uklinux.net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
11:58pm up 2 days, 21:51, 2 users, load average: 1.00, 1.01, 1.02
------------------------------
Date: Wed, 04 Jul 2001 23:15:42 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Date Subtraction Routine
Message-Id: <mbudash-D1175E.16154204072001@news.sonic.net>
In article <V_L07.147009$qc.17443925@news1.rdc1.va.home.com>, "David
Mohorn" <david.mohorn@home.com> wrote:
> I need a way to calculate a previous date from a start date. For example,
> if I want to get the date 7 days for today, I need something like "Today -
> 7" and it will give me the date a week ago. Of course, I need the date in
> MM/DD/YYYY format.
>
> Anyone know an efficient way of doing this? Do I need a perl module or is
> there an easy way to do this...??
see Date::Manip
hth-
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: Wed, 4 Jul 2001 22:14:53 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: FAQ 9.4: How do I extract URLs?
Message-Id: <14600-3B43DBAD-532@storefull-247.iap.bryant.webtv.net>
I've read that example several times and still don't get it. Can someone
please explain where you put the URL to grab into that qx script? And
where do you put the location to store it in?
--Dennis
------------------------------
Date: Wed, 4 Jul 2001 20:52:04 -0500
From: "HM" <horizons@fastbytes.com>
Subject: Help with pop-up problem
Message-Id: <3b43cae0$1@windy.powercom.net>
I am trying to make an improvement to a chat script to allow users to have
avatars in their own specific user directory selectable from a pop up menu
when they post their message...
I've got the menu working, that avatar selected appears with the message
post, but when it reloads, the menu resets to the default "no icon selected"
setting.
Can someone give me a straight forward method of keeping the pop up menu on
the selection of the user on the reloading of the page, please.
If you have a solution, email it directly to:
horizons@fastbytes.com
please put pop-up in the subject line so I'll spot it as soon as it comes
in.
Thanx in advance, whoever *s*
------------------------------
Date: 04 Jul 2001 21:17:14 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Help with pop-up problem
Message-Id: <87vgl8xgph.fsf@limey.hpcc.uh.edu>
>> On Wed, 4 Jul 2001 20:52:04 -0500,
>> "HM" <horizons@fastbytes.com> said:
> I am trying to make an improvement to a chat script to
> allow users to have avatars in their own specific user
> directory selectable from a pop up menu when they post
> their message...
> I've got the menu working, that avatar selected appears
> with the message post, but when it reloads, the menu
> resets to the default "no icon selected" setting.
> Can someone give me a straight forward method of keeping
> the pop up menu on the selection of the user on the
> reloading of the page, please.
perldoc Tk
> If you have a solution, email it directly to:
> horizons@fastbytes.com
Yeah right.
hth
t
--
Beep beep! Out of my way, I'm a motorist!
------------------------------
Date: Wed, 04 Jul 2001 22:26:18 GMT
From: echang@netstorm.net (E.Chang)
Subject: Re: how to use pod::html and pod::text
Message-Id: <Xns90D4BC11184echangnetstormnet@207.106.93.86>
echang@netstorm.net (E.Chang) wrote in
<Xns90D4B7102638Dechangnetstormnet@207.106.93.86>:
>"Santiago Alvarez" <santiago@computer.org> wrote in
><9i00o2$2re7m3@news1s.iddeo2.es>:
>
>> I have a perl script that I want to return depending on a
>> parameter the pod documentation included in the same file.
Using Pod::Text, the changes in the example would be:
use Pod::Text;
print "Content-type: text/plain\n\n";
if ($ENV{QUERY_STRING}) {
my $parser = Pod::Text->new (sentence => 0, width => 78);
$parser->parse_from_file ($0);
}
If you want to call the script from the command line, or send the
documentation output to a file, just change the condition and the input
and output specifications. See perldoc Pod::Html and perldoc Pod::Text
or the online documentation at http://www.perldoc.com/perl5.6/lib.html.
--
EBC
------------------------------
Date: Wed, 4 Jul 2001 23:54:43 +0100
From: "Tony" <tailorontap@pantsbtinternet.com>
Subject: Keen, experienced, or improving Perl author required
Message-Id: <9i06tb$h7v$1@plutonium.btinternet.com>
My apologies if this is not the correct group.
I am now actively seeking a Perl (and where possible PHP) author who has
that extra vision and mad desire to improve themselves.
This is to develop jointly a new impending cash Cow application. I have the
basic working script which within the next 6 months will require intelligent
tweaking to reformat required reports and submission methods for paying
clients.
For preference you should be located in the UK or even South West Wales
ideally. No age preferences or bias - just that I am seeking primarily an
author with vision and a real feel for where the Internet should go.
This venture will only be on a mutual profit sharing method where some 20%
of the income revenue will be the reward over a 3 to 5 year period. 25% is
being offered to partner affiliates. Therefore this is not a once off pay up
front deal - but an experienced analysis of some of the ideas that solid
bricks to clicks converts need.
Design and site expertise is on hand at www.aah-haa.com and at
www.inkylink.co.uk I would not expect any return in less than 6 months -
but , from then on a steady residual stream as paying clients join.
So, you should be able to venture and fly by the seat of your pants as well
as deliver timely and clean solutions from an established text base. Mysql
knowledge could be handy at a later date.
A none disclosure agreement would be required.
Contact Tony
--
The New JetTec inkjet cartridges for Epson and chips
680/790/1270/2000P with the new ILRS ink level computer
http://www.inkylink.co.uk
remove pants to reply personally
------------------------------
Date: Thu, 05 Jul 2001 00:03:33 GMT
From: Rickey Ingrassia <r1ckey@home.com>
Subject: Re: Net::Telnet logging on problem.....
Message-Id: <p9O07.13053$wr.64814@news1.frmt1.sfba.home.com>
In comp.lang.perl.misc Daniel Colin Perez <danielperez@mediaone.net> wrote:
>This is just what I have been looking for, others who use this package!....
>I have used all the features discussed in this email, and they only
>intermittantly work. I have corresponded with the author of the code, but
>he just thought it was a server side problem and didn't give much feeback.
>What I am trying to figure out is how it can be the remote server with the
>results I get.
> If the far end device has not returned a value for a command and I try to
>do a get or getline or even use cmd with the right prompt, it times out even
>after 100 seconds (while the far end is done within 1 second). If the far
>end device is ready prior to my get, it works. Note that it is not a matter
>of waiting longer for the return, the return is lost if I read early! So if
>I read in 1/2 second I never get the response, if I read in 2 seconds I get
>it. Why doesn't the response get received after a 2 second wait within the
>telnet code? Why are reads destructive? I have tried output dump and input
>dumps, but none of the diagnostics explain it, the characters are lost in
>those dump files as well. The dumps confirm that the characters are not
>received by Net::Telnet yet two other telnet packages (Teraterm & Python
>Telnet) get all the characters, always. I know the code is built on sockets
>and I looked at the calls, they look good. If the socket does not have data
>the select should block until there is data. The act of waiting should not
>affect the remote device.
>I am using $host->cmd, but I have tried get, getline, print etc. Note that
>I my communications all work depending on the speed or sleeps between calls,
>so there are no "bugs" I can find on my end. Any thoughts on this would
>help as I'm debating going directly to sockets.
--snip--
Does this happen on all the servers you connect to or just one in particualar?
I have had problems with some servers, mostly propriety Telnet implementations
where sleeps were required. What about sniffer traces, what do they indicate?
What OS are the scipts running on? To be of any assistance at all I would need
more information. Feel free to email any of this information to me to keep the
clutter off the NG.
--
____ __
______/_ | ____ | | __ ____ ___.__.
\_ __ \ |/ ___\| |/ // __ < | |
| | \/ \ \___| <\ ___/\___ |
|__| |___|\___ >__|_ \\___ > ____|
_________________\/_____\/____\/\/_____
---------------------------------------
------------------------------
Date: Thu, 5 Jul 2001 10:53:46 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Off topic (somewhat) - No - Extremely!
Message-Id: <ggP07.17$kX2.948@vic.nntp.telstra.net>
"Catfish" <C@TFISH.NET> wrote in message
news:9i0f07$14k$1@newsg2.svr.pol.co.uk...
> I'll cut the chit chat, make it simple.
What does any of that have to do with Perl?
Wyzelli
--
push@x,$_ for(a..z);push@x,' ';
@z='092018192600131419070417261504171126070002100417'=~/(..)/g;
foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;
------------------------------
Date: Thu, 5 Jul 2001 02:38:01 +0100
From: "Catfish" <C@TFISH.NET>
Subject: Re: Off topic (somewhat) - No - Extremely!
Message-Id: <9i0ge6$dr2$1@newsg1.svr.pol.co.uk>
"Wyzelli" <wyzelli@yahoo.com> wrote in message
news:ggP07.17$kX2.948@vic.nntp.telstra.net...
> "Catfish" <C@TFISH.NET> wrote in message
> news:9i0f07$14k$1@newsg2.svr.pol.co.uk...
> > I'll cut the chit chat, make it simple.
>
> What does any of that have to do with Perl?
>
> Wyzelli
> --
> push@x,$_ for(a..z);push@x,' ';
> @z='092018192600131419070417261504171126070002100417'=~/(..)/g;
> foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;
>
> I installed Active Perl and bodged together a script to solve this one
problem. I figured it was worth asking some questions, since getting around
a given problem doesn't help provide future reference. Can you be of
assistance?
I'll listen. I was just wondering if server permissions automatically block
16 bit stuff. If so, I suppose I'll need to give Perl some serious
attention.
------------------------------
Date: 04 Jul 2001 20:42:30 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Off topic (somewhat) - No - Extremely!
Message-Id: <87zoakxibd.fsf@limey.hpcc.uh.edu>
>> On Thu, 5 Jul 2001 02:38:01 +0100,
>> "Catfish" <C@TFISH.NET> said:
> "Wyzelli" <wyzelli@yahoo.com> wrote in message
> news:ggP07.17$kX2.948@vic.nntp.telstra.net...
>> "Catfish" <C@TFISH.NET> wrote in message
>> news:9i0f07$14k$1@newsg2.svr.pol.co.uk... > I'll cut
>> the chit chat, make it simple.
>>
>> What does any of that have to do with Perl?
>>
>> Wyzelli -- push@x,$_ for(a..z);push@x,' ';
>> @z='092018192600131419070417261504171126070002100417'=~/(..)/g;
>> foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;
>>
>> I installed Active Perl and bodged together a script to
>> solve this one
> problem. I figured it was worth asking some questions,
> since getting around a given problem doesn't help
> provide future reference. Can you be of assistance?
> I'll listen. I was just wondering if server permissions
> automatically block 16 bit stuff.
So post to a newsgroup that deals with the particular
server software you are using.
hth
t
--
Beep beep! Out of my way, I'm a motorist!
------------------------------
Date: Thu, 5 Jul 2001 02:11:49 +0100
From: "Catfish" <C@TFISH.NET>
Subject: Off topic (somewhat)
Message-Id: <9i0f07$14k$1@newsg2.svr.pol.co.uk>
I'll cut the chit chat, make it simple.
Running IIS 4 on NT
Want to run a com file in cgi-bin directory.
IIS won't let me.
Keeps asking for login when accessing the file, but doesn't accept me.
Got pissed off, logged in as administrator, stripped all ACL restrictions.
Anyone and his hairy dog can now run stuff in the cgi-bin.
Scripts run fine there, 32 bit exes run fine there, but not the com.
Doesn't say "16 bit not allowed", just gives the "you don't have permission"
jazz.
The program works if you run it directly. (passes parameters to a pdf
generator).
Don't tell me I have to recompile it with a 32 bit compiler because:
A. I'm too poor to buy it.
B. Don't have the source.
C. Too stupid to do it anyway.
I haven't had any other error message, other than ACL stuff.
I can solve the problem with a veeery simple Perl script,
but that's not the point. I'm pissed off, and I want to run that damn com
file as is.
------------------------------
Date: Thu, 5 Jul 2001 12:19:16 +1000
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: Passing Variables to a Javascript from a Perl CGI script...
Message-Id: <pbQ07.111$Ef3.7246@ozemail.com.au>
Jason
Tut # 39 might help: http://savage.net.au/Perl-tutorials.html
--
Cheers
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html
------------------------------
Date: Wed, 04 Jul 2001 22:55:13 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Request Advice for Proper Case of String
Message-Id: <tk77mhk1tl5d71@corp.supernews.com>
Buck Turgidson (jc_va@spamisnotcool.hotmail.com) wrote:
: I have some text in the format employee_rec, always with the underbar. I am
: relatively new to perl, and I see that it has a uc(), and an ucfirst() function.
: What I want to do is transform that string to Employee_Rec.
This looks like a job for the substitute operator, to me. You want to
find all strings of lowercase characters in the identifier, and upcase the
first letter of each. In regex-ese, that's expressed as:
s/([a-z]+)/\u$1/g;
That \u is just shorthand in doublequotish context for uc().
--
| Craig Berry - http://www.cinenet.net/~cberry/
--*-- "Magick is the art and science of causing change in conformity
| with Will." - Aleister Crowley
------------------------------
Date: Wed, 04 Jul 2001 23:00:40 GMT
From: "Buck Turgidson" <jc_va@spamisnotcool.hotmail.com>
Subject: Re: Request Advice for Proper Case of String
Message-Id: <seN07.73572$Md.19991183@typhoon.southeast.rr.com>
Thanks. I knew it had to be easy. Perl is definitely growing on me.
"Craig Berry" <cberry@cinenet.net> wrote in message
news:tk77mhk1tl5d71@corp.supernews.com...
> Buck Turgidson (jc_va@spamisnotcool.hotmail.com) wrote:
> : I have some text in the format employee_rec, always with the underbar. I am
> : relatively new to perl, and I see that it has a uc(), and an ucfirst()
function.
> : What I want to do is transform that string to Employee_Rec.
>
> This looks like a job for the substitute operator, to me. You want to
> find all strings of lowercase characters in the identifier, and upcase the
> first letter of each. In regex-ese, that's expressed as:
>
> s/([a-z]+)/\u$1/g;
>
> That \u is just shorthand in doublequotish context for uc().
>
> --
> | Craig Berry - http://www.cinenet.net/~cberry/
> --*-- "Magick is the art and science of causing change in conformity
> | with Will." - Aleister Crowley
------------------------------
Date: Wed, 04 Jul 2001 17:27:23 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Request Advice for Proper Case of String
Message-Id: <3B43B46B.3139B327@stomp.stomp.tokyo>
Buck Turgidson wrote:
(snipped)
> I have some text in the format employee_rec, always with the underbar. I am
> relatively new to perl, and I see that it has a uc(), and an ucfirst() function.
> What I want to do is transform that string to Employee_Rec.
$string =~ s/employee_rec/Employee_Rec/;
Godzilla!
------------------------------
Date: Thu, 05 Jul 2001 01:07:16 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Request Advice for Proper Case of String
Message-Id: <mbudash-CF862F.18071604072001@news.sonic.net>
In article <3B43B46B.3139B327@stomp.stomp.tokyo>, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
> Buck Turgidson wrote:
>
> (snipped)
>
> > I have some text in the format employee_rec, always with the underbar.
> > I am
> > relatively new to perl, and I see that it has a uc(), and an ucfirst()
> > function.
> > What I want to do is transform that string to Employee_Rec.
>
>
> $string =~ s/employee_rec/Employee_Rec/;
>
they say you cannot destroy energy, only convert it from one form to
another... seems like the same holds true for godzilla's attitude...
just kinda goes from bad to worse...
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: Wed, 4 Jul 2001 17:44:01 +0400
From: "Alex" <alex82p@svs.ru>
Subject: Sendmail
Message-Id: <9i0ig0$1l18$3@josh.sovintel.ru>
I have perl 5.5. Where can I find sendmail?
------------------------------
Date: Thu, 05 Jul 2001 03:35:21 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Sendmail
Message-Id: <ZfR07.163593$DG1.27229036@news1.rdc1.mi.home.com>
In article <9i0ig0$1l18$3@josh.sovintel.ru>,
"Alex" <alex82p@svs.ru> writes:
> I have perl 5.5. Where can I find sendmail?
[It's probably not Perl 5.5. It might be 5.6, or 5.005, but certainly
not 5.5.]
Try http://www.google.com and use the term "sendmail". You can even use
the "I'm feeling lucky" button, because your first hit is the Sendmail
home page.
Search engines are useful for these kinds of things.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours *and*
clintp@geeksalad.org Perl Developer's Dictionary
"If you rush a Miracle Man, for details, see http://geeksalad.org
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Thu, 5 Jul 2001 12:16:49 +1000
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: Text based menuing system in Perl with submenus???
Message-Id: <79Q07.109$Ef3.7196@ozemail.com.au>
David
See below.
--
Cheers
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html
David Mohorn <david.mohorn@home.com> wrote in message news:b_L07.147006$qc.17443600@news1.rdc1.va.home.com...
> Does anyone have any sample code of a text base menu system in Perl that is
> flexible and easy to maintain? I could have nested menus, meaning: menu 1
> could have an option to menu 2. Menu 2 could have an option for menu 3. As
> users back out from menu 3, it should return to menu 2, then back to menu 1.
>
> I currently do something like:
[snip]
Hmmm. I know it might seem like a huge overhead, but have you considered installing Apache on your PC? That way, you can do it all
in Perl + CGI.pm => HTML, and it will be OS-independent and, for that matter, web server-independent, and browser-independent,
and...
That's what I run at home. Now I can run _all_ my Perl scripts thru a CGI front-end, and ...
------------------------------
Date: Wed, 4 Jul 2001 17:14:16 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: web fetching
Message-Id: <23117-3B439538-476@storefull-244.iap.bryant.webtv.net>
That's true that you can put modules in a local directory. However,
sometimes they need to be compiled.
Is there anything from the standard perl distribution that will allow
you to grab and store a file from the web?
I have Socket.pm installed on my server; but not Socket::INET. You seem
to be saying that Socket will grab a file. I didn't know that you could
grab a file off the internet by just using the plain Socket.pm.
Could you give me some code on how to do that? I'd appreciate it.
Regards,
--Dennis
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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.
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 V10 Issue 1247
***************************************