[18368] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 536 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 20 18:06:09 2001

Date: Tue, 20 Mar 2001 15:05:22 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <985129522-v10-i536@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 20 Mar 2001     Volume: 10 Number: 536

Today's topics:
    Re: ${_}name -> compile error? (Jim Kroger)
    Re: ${_}name -> compile error? <bart.lateur@skynet.be>
    Re: ${_}name -> compile error? (Jim Kroger)
        accessing variable in string context <jhall@ifxonline.com>
    Re: AUTHORIZATION <cernava@itexas.net>
        Capturing both STDOUT and STDERR from `ls` ? <ericg@redback.com>
    Re: Capturing both STDOUT and STDERR from `ls` ? <krahnj@acm.org>
    Re: Capturing both STDOUT and STDERR from `ls` ? <ddunham@redwood.taos.com>
        files in a directory <Waarddebon@chello.nl>
        Functional Perl code that fails with Embperl (R. D. Davis)
    Re: Hallucinations of symrefs? (Eric Bohlman)
    Re: Hallucinations of symrefs? <bart.lateur@skynet.be>
        How to sort ? <Waarddebon@chello.nl>
    Re: How to sort ? <juex@deja.com>
    Re: HTTP Client Question <bdilworth@mco.edu>
    Re: many "used only once, possible typo" warnings in CG <webmaster@webdragon.munge.net>
    Re: Moving and mkdir in Unix <tlav1@mediaone.net>
        Need help with perl4 && syntax. <vjayl@emc.com>
        Pointers in Perl <milliwave@rfengineering.freeserve.co.uk>
    Re: Pointers in Perl <juex@deja.com>
    Re: Pointers in Perl <krahnj@acm.org>
    Re: Powers <webmaster@webdragon.munge.net>
    Re: print perldoc-pages nicely <bart.lateur@skynet.be>
        Print To Same Line - No Carriage Return (Steve Reiss)
    Re: Print To Same Line - No Carriage Return <krahnj@acm.org>
    Re: Print To Same Line - No Carriage Return (John Joseph Trammell)
    Re: Q: usernames & passwords - how to ??? <greg2@surfaid.org>
    Re: Script for mail forwarding? (Abigail)
    Re: Short Course Announcement <uri@sysarch.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 20 Mar 2001 17:49:38 -0500
From: minorseventhSPAMBLOCK@earthlink.net (Jim Kroger)
Subject: Re: ${_}name -> compile error?
Message-Id: <minorseventhSPAMBLOCK-2003011749380001@tritone.csbmb.princeton.edu>

In article <umu8bt09kqg6gq5sb6bgro9rusm13bj2ft@4ax.com>, Bart Lateur
<bart.lateur@skynet.be> wrote:

> Jim Kroger wrote:
> 
> >I need to put the number of lines in the subject's data file into a
variable, 
> >for example, the number of lines in anna's file into $annalines.
> 
> What's wrong with $lines{anna}?

I thought this was a quick solution but I'm having trouble. 

Note that my orignal useage, ${_}lines to represent (in the context of a
foreach loop)  $annalines. I presume you mean
I should use $lines{_} instead. Since this separates the $ and the _, will
this still represent the $_ value in the foreach loop?

Of course I can't hard code $linesanna because I don't know what the names
will be, this will process as yet unacquired data, read from a file into
the @subjects array.


Thanks
Jim


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

Date: Tue, 20 Mar 2001 22:58:03 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: ${_}name -> compile error?
Message-Id: <h1ofbt004be3g1iia4ugbidksqa0ut1ae6@4ax.com>

Jim Kroger wrote:

>> What's wrong with $lines{anna}?
>
>I thought this was a quick solution but I'm having trouble. 
>
>Note that my orignal useage, ${_}lines to represent (in the context of a
>foreach loop)  $annalines. I presume you mean
>I should use $lines{_} instead. Since this separates the $ and the _, will
>this still represent the $_ value in the foreach loop?

You must have missed the point. Since you appear to need a scalar per
user, it's easy to use a hash instead. That's what I'm doing: 
$lines{anna} is the same as $lines{"anna"}, or the entry in the hash
%lines for the string "anna".

It's not that easy (but still doable) if you need an array or a hash per
user.

So, in short: use $lines{$_} in the loop.

-- 
	Bart.


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

Date: Tue, 20 Mar 2001 17:53:00 -0500
From: minorseventhSPAMBLOCK@earthlink.net (Jim Kroger)
Subject: Re: ${_}name -> compile error?
Message-Id: <minorseventhSPAMBLOCK-2003011753000001@tritone.csbmb.princeton.edu>

In article <991hob$re7$1@bob.news.rcn.net>, ebohlman@omsdev.com (Eric
Bohlman) wrote:


> Use the hash, Luke.


OK, folks, time to do my first hash. I'll let you know how it went (or, as
the case may be, didn't).

Thanks!

Jim


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

Date: Tue, 20 Mar 2001 22:57:50 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: accessing variable in string context
Message-Id: <OfRt6.51468$o7.2217896@news1.rdc1.sdca.home.com>


I have x number of entries in a hash.

For each of those entries I try retrieving a param() with a corresponding
name.

I have a list of names, some of those names would be used as a
param('namehere') - and when I get the param I'd like to be able to
associate it with the name again. The easiest way is to be able to take the
variable i'm working with and grab it's name like a string.

Here's some sample code to give you the idea; imaging $bob, $dick, etc are
param('bob') and param('dick') instead, and that I have a hash somewhere
that has those names in it, which is how I looked for them as param()'s in
the first place...

Now even i'm confused.. :(

#!/usr/bin/perl

$bob = '1, 2, 3, 4, 5, 6, 7, 8, 9, 10';
$dick = '4, 9, 11, 14, 18';
$harry = '4, 5, 4, 14, 18, 23';
$fred = '4, 2, 8, 14, 23';

@param = (bob, dick, harry, fred);


for ($i=0;$i<@param;$i++) {

@tmparray  = split /,/, ${$param[$i]};

for ($j=0;$j<@tmparray;$j++) {

if (defined $sitedb{"$tmparray[$j]"}) { $sitedb{"$tmparray[$j]"} =
$sitedb{"$tmparray[$j]"}."``".$param[$i];
                     }else{
$sitedb{"$tmparray[$j]"} = $param[$i]; }

        }

}




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

Date: Tue, 20 Mar 2001 13:26:47 -0600
From: "Itexas" <cernava@itexas.net>
Subject: Re: AUTHORIZATION
Message-Id: <998auh0qau@enews4.newsguy.com>

Sorry, think I got the wrong group. I'll try
comp.infosystems.www.authoring.cgi


"Itexas" <cernava@itexas.net> wrote in message
news:9986jb04em@enews3.newsguy.com...
> In a CGI I send a 401 WWW-Authenticate: Basic header and when the browser
> sends me back the user name and password its not in the ENV hash. How do I
> make so Apache puts it in there? I do know you can do it on php. Where the
> password and user name are in vars.
>
> Thank you,
> Richard Cernava
>
>
>
>




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

Date: Tue, 20 Mar 2001 12:50:13 -0800
From: Eric Goodill <ericg@redback.com>
Subject: Capturing both STDOUT and STDERR from `ls` ?
Message-Id: <BBC4F7379A411DFC.B92F5B0594DFBA2E.AC671C8B72123BA9@lp.airnews.net>

Hi,

I often do things like this:

@ls_list = `ls $target.*`;

This works great except that if $target.* doesn't match anything, then I
get ls' error output written to STDERR:

foo: No such file or directory

This is fine, but it pops out onto the shell window, and it just adds
extra noise to the output I'd rather not have.

I have looked around some, but I couldn't find a way to capture both
STDOUT and STDERR from a backtick invocation of a command.

I figure there must be a way (it is perl after all).  In fact there must
be multiple ways to do it...

Cheers, Eric


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

Date: Tue, 20 Mar 2001 21:37:45 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Capturing both STDOUT and STDERR from `ls` ?
Message-Id: <3AB7CF46.CBD1A3D8@acm.org>

Eric Goodill wrote:
> 
> Hi,
> 
> I often do things like this:
> 
> @ls_list = `ls $target.*`;
> 
> This works great except that if $target.* doesn't match anything, then I
> get ls' error output written to STDERR:
> 
> foo: No such file or directory
> 
> This is fine, but it pops out onto the shell window, and it just adds
> extra noise to the output I'd rather not have.
> 
> I have looked around some, but I couldn't find a way to capture both
> STDOUT and STDERR from a backtick invocation of a command.
> 
> I figure there must be a way (it is perl after all).  In fact there must
> be multiple ways to do it...

opendir DIR, '.' or die "Could not open the current directory: $!";
my @ls_list = grep /^\Q$target\E\./, readdir DIR`;
closedir DIR;

# or

my @ls_list = glob( "\Q$target\E.*" );

print "There were no files to be found!\n" unless @ls_list;


John
-- 
use Perl;
program
fulfillment


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

Date: Tue, 20 Mar 2001 22:34:01 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Capturing both STDOUT and STDERR from `ls` ?
Message-Id: <tVQt6.218$Fk4.90383@news.pacbell.net>

Eric Goodill <ericg@redback.com> wrote:
> Hi,

> I often do things like this:

> @ls_list = `ls $target.*`;

> This works great except that if $target.* doesn't match anything, then I
> get ls' error output written to STDERR:

> foo: No such file or directory

> This is fine, but it pops out onto the shell window, and it just adds
> extra noise to the output I'd rather not have.

> I have looked around some, but I couldn't find a way to capture both
> STDOUT and STDERR from a backtick invocation of a command.

You can't get STDERR with backticks.

> I figure there must be a way (it is perl after all).  In fact there must
> be multiple ways to do it...

You can...
1) Point STDERR at STDOUT and grab them both.
$a = `ls foo.* 2>&1`
2) Use something other than `` (like open2/open3).

In your particular case, you are requesting that the shell expand the
glob (rather than perl), so open2/open3 would require that you opened
/bin/sh and not /bin/ls.

-- 
Darren Dunham                                           ddunham@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >


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

Date: Tue, 20 Mar 2001 21:39:15 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: files in a directory
Message-Id: <76Qt6.2154147$%C1.28360858@Flipper>

How to place all files in a given directory in a string ?





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

Date: Tue, 20 Mar 2001 22:48:20 -0000
From: rdd@smarty.smart.net (R. D. Davis)
Subject: Functional Perl code that fails with Embperl
Message-Id: <tbfnhkahhog445@corp.supernews.com>

Can anyone kindly explain why the following Perl code, which works
fine when not used with Embperl, produces a seemingly nonsensical 
error when run while using Embperl?  

open(FOO, "/home/nobody/all-tables");
while ($TextIn=<FOO>) {
    ($x,$x1,$x2) = split (/\|/,$TextIn);     
    ($fiz) = $x =~ m/^\s([a-z]+)/g;
    if ($fiz ne "") {
       push @tables, $fiz;
   }
}
close(FOO);

The following error message is produced.

   [723]ERR: 24: Line 57: Error in Perl code: syntax error at
   /home/www/apache/htdocs/med-search1a.epl line 65, near "=) "
   syntax error at /home/www/apache/htdocs/med-search1a.epl line 73,
   near "}
     
   close"

I've ascertained that the open call is working (well, it appaers to be
anyway!); it returns a 1. The file exists and is readable by user
nobody.  If I comment out the while loop, or even just the line
containing "while (..." and the bracket that ends this loop, the error
message goes away.

If it makes any difference, I'm using the latest non-beta version of
Embperl, mod_perl and have tried this with Perl 5.005 and Perl 5.6.

-- 
Copyright (C) 2001 R. D. Davis    Ancient guru who see future once say:
All Rights Reserved               "wise man who meditate upon immortal wisdom 
rdd@perqlogic.com 410-744-4900    of Bart Simpson's words: "Don't have a cow, 
http://www.perqlogic.com/rdd      man" will enjoy interesting life."


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

Date: 20 Mar 2001 20:26:42 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Hallucinations of symrefs?
Message-Id: <998ee2$8sg$1@bob.news.rcn.net>

Bart Lateur <bart.lateur@skynet.be> wrote:
> This looks like a Perl bug. But I can't test it. Can't you provide some
> environment to where this sub is supposed to be plugged in, so we can
> run it for ourselves? At least a compatible object, that would be nice.

I will if I get time; since I was able to work around it, it doesn't have 
very high priority for me and my question was mostly out of curiosity.



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

Date: Tue, 20 Mar 2001 21:02:56 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Hallucinations of symrefs?
Message-Id: <kchfbts22a3it9p09ind3g1703rmn1q7si@4ax.com>

Eric Bohlman wrote:

>my question was mostly out of curiosity.

Well, you're not the only one who is curious. I, for one, am curious if
it works properly in 5.6.0  or 5.6.1. But without adding a lot of code
ourselves, it's not easy to start testing.

-- 
	Bart.


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

Date: Tue, 20 Mar 2001 21:54:31 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: How to sort ?
Message-Id: <rkQt6.2154357$%C1.28365616@Flipper>

I've got a script that loads a text file in, which contains something like
this

101,blablabla,blablabla
105,blablabla,blablabla
103,blablabla,blablabla
104,blablabla,blablabla
100,blablabla,blablabla
and so on....

Here is my problem, as you can see the numbers each line begins with aren't
sorted ascended. Does anyone know how I can build a sort function in ?




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

Date: Tue, 20 Mar 2001 13:59:52 -0800
From: "Jürgen Exner" <juex@deja.com>
Subject: Re: How to sort ?
Message-Id: <3ab7d2d9@news.microsoft.com>

"Waarddebon" <Waarddebon@chello.nl> wrote in message
news:rkQt6.2154357$%C1.28365616@Flipper...
[...]
> Here is my problem, as you can see the numbers each line begins with
aren't
> sorted ascended. Does anyone know how I can build a sort function in ?

Well, which problems do you have with "sort"?

jue




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

Date: Tue, 20 Mar 2001 15:34:21 -0500
From: Bob Dilworth <bdilworth@mco.edu>
Subject: Re: HTTP Client Question
Message-Id: <3AB7BECC.D218901A@mco.edu>

Chris Stith wrote:

> So are you saying you'd rather the other readers _not_ be able to
> plonk at will? Perhaps you should tell us who we can and cannot plonk?

No, I'm saying that since the "experts" can plonk at will then I, as a
non-expert, can plonk the experts who plonk at will.  I say the more plonking
the better!  The ultimate goal is a newsgroup of experts who have no
questions to answer since everyone is plonked.  It's all very zen-like (or
not).

Bob D.



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

Date: 20 Mar 2001 20:14:50 GMT
From: "Scott R. Godin" <webmaster@webdragon.munge.net>
Subject: Re: many "used only once, possible typo" warnings in CGI.pm using import_names("UT");
Message-Id: <998dnq$g9v$0@216.155.33.39>

In article <1afebt0a78rln3lkaejrduecfvakmsp3h6@4ax.com>, Bart Lateur 
<bart.lateur@skynet.be> wrote:

 | Scott R. Godin wrote:
 | 
 | >so is it possible to do something like 
 | >
 | >#!perl -w
 | >use strict;
 | >
 | >@main::global_variables = qw($var1 @var2 %var3);
 | >use vars @main::global_variables;
 | >
 | >package MyOtherPackage;
 | >use vars @main::global_variables;
 | >
 | >package main;
 | >
 | >effectively?
 | 
 | No you missed a thing. The array must already be filled at the time the
 | compiler find the "use" statement that depends on it. If that global
 | variable was initialized inside a module that you used, it would work.
 | But withing one script file, you need to put it in a BEGIN block.
 | 
 | I expect this to work:
 | 
 | 	BEGIN {
 | 	    @main::global_variables = qw($var1 @var2 %var3);
 | 	}
 | 	use vars @main::global_variables;

:D Thanks a bunch, Bart. This helps enormously. 

One other question though ... (:

When I do something like this, does it mean that those variables are 
still restricted to their respective packages? 

I expect that a change to $var1 in the main package will NOT affect the 
value of the $MyOtherPackage::var1 ... oh hell, I suppose I could just 
test it :) Thanks again.

-- 
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw"; 
# ( damn spammers. *shakes fist* take a hint. =:P )


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

Date: Tue, 20 Mar 2001 21:14:52 GMT
From: ted <tlav1@mediaone.net>
Subject: Re: Moving and mkdir in Unix
Message-Id: <3AB7F325.67B5EB0C@mediaone.net>

Granted these types of questions can be irksome and take up valuable space
that might otherwise be used for better purposes, but aren't we better off
just ignoring them instead of taking up even more space by replying with
lengthy, truculent diatribes that help no one?

ted



Michael Carman wrote:

> [Posted and mailed.]
>
> Milliwave wrote:
> >
> > I need to some to inform me by means of an example how would go
> > about what I have asked for, as I don't have access to the perldoc
> > manuals
>
> Here's what you think you said:
>
>    "I don't think I have the documentation, so please take pity on
>     a poor soul and help me out."
>
> Here's what that sounds like on Usenet:
>
>    "I don't think I have the documentation, and I'm too lazy to
>     look for it. I'd rather have you read it to me. Better yet,
>     fix my problem for me."
>
> Not quite the same, huh? As you might expect, people get upset when
> someone says the latter and are not inclined to help.
>
> Part of the problem, you see, is that I don't believe that you don't
> have access to the docs. The documentation is part of the standard
> distribution. Unless you have a broken installation or are on a
> rare/exotic platform, you have it - right there on the very same
> computer that you're running perl from. Even if it's not on your
> computer (doubtful) you still have access to it if you have access to
> the web, or FTP. All you have to do is type 'perldoc' into your favorite
> search engine. http://www.perldoc.com is the very first thing that
> Google turns up.
>
> A person is expected to spend 10-15 minutes of their own time searching
> the docs and trying to answer their own question before posting. "Not
> having" them isn't accepted as an excuse here. If you don't know where
> they are, find them. If you don't have them, get them.
>
> So as you can see, you kind of hit a nerve around here by saying that.
> Try not to do it again, okay? :)
>
> -mjc



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

Date: Tue, 20 Mar 2001 17:49:51 -0500
From: Vjay Lescoe <vjayl@emc.com>
Subject: Need help with perl4 && syntax.
Message-Id: <3AB7DE8F.5B6FF0D6@emc.com>

Can some one please tell me if this syntax is correct? I can't figure
out why my program bombs
here.

if (! ( -f $CPUTMPFILE/CPUALARM_$DM ) && ( $CPUIDLE < $CPUALARM ) )

A single if with both of these works fine? Any ideas? Thanks!

vjl

--
 V.Jay Lescoe                           EMC Corporation
 Systems Administrator                  171 South Street
 (508)435-1000 ext 14957                Hopkinton, MA 01748
 (508)497-8082 fax                      www.emc.com





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

Date: Tue, 20 Mar 2001 21:57:57 -0000
From: "Milliwave" <milliwave@rfengineering.freeserve.co.uk>
Subject: Pointers in Perl
Message-Id: <998jm9$bt8$1@news8.svr.pol.co.uk>

Has anyone come across the usage of pointers in Perl? I certainly have not
see these being used.
Any information on their usage would be greatly appreciated.

Cheers
Kev




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

Date: Tue, 20 Mar 2001 14:00:59 -0800
From: "Jürgen Exner" <juex@deja.com>
Subject: Re: Pointers in Perl
Message-Id: <3ab7d31c$1@news.microsoft.com>

"Milliwave" <milliwave@rfengineering.freeserve.co.uk> wrote in message
news:998jm9$bt8$1@news8.svr.pol.co.uk...
> Has anyone come across the usage of pointers in Perl? I certainly have not
> see these being used.
> Any information on their usage would be greatly appreciated.

In Perl they are called references.
Just search for them in the docs and you will find plenty.

jue




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

Date: Tue, 20 Mar 2001 22:07:42 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Pointers in Perl
Message-Id: <3AB7D64B.BF5A8397@acm.org>

Milliwave wrote:
> 
> Has anyone come across the usage of pointers in Perl? I certainly have not
> see these being used.
> Any information on their usage would be greatly appreciated.

Perl doesn't have any pointy things. They've all been rounded off
through years of use. :^)


John
-- 
use Perl;
program
fulfillment


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

Date: 20 Mar 2001 21:31:28 GMT
From: "Scott R. Godin" <webmaster@webdragon.munge.net>
Subject: Re: Powers
Message-Id: <998i7g$pf3$1@216.155.33.39>

In article <985017108.6910@itz.pp.sci.fi>, Ilmari Karonen 
<usenet11400@itz.pp.sci.fi> wrote:

 | Whatever happened to the "newsgroup Taliban"?

died in a fit of apoplexy? (:

-- 
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw"; 
# ( damn spammers. *shakes fist* take a hint. =:P )


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

Date: Tue, 20 Mar 2001 21:19:35 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: print perldoc-pages nicely
Message-Id: <tfhfbtogbqiujcol6hddhhge0memrhovu5@4ax.com>

Dirk Wessner wrote:

>How can I print perldoc pages nicely
>formatted on a Postscript printer?

I've read that there are certain POD formatter programs available.
Thery're called something like Pod::* or Pod2*. In fact, Pod::Html and
Pod::Text are currently in the standard distribution, the latter being
what perldoc uses.

I've heard very nice things about Pod::Pdf, although I haven't tried it
myself. And PDF is very closely related to PostScript. Perhaps that
could be a starting point? Otherwise, I noticed on CPAN that there is
also a few Pod::Rtf modules; and Pod::HtmlPsPdf, although that one looks
more complicated.

-- 
	Bart.


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

Date: Tue, 20 Mar 2001 20:46:10 GMT
From: NoSPAM@netmind.com (Steve Reiss)
Subject: Print To Same Line - No Carriage Return
Message-Id: <3ab7c07c.16181838@news.got.net>

All,

I need to print out the progress of an operation as it iterates
through its loop.  I want to print this out on the same line so there
is no advancement of the row & column.

In other words, how do I print to the same row & column without a
carriage return?

example :

 Loop = n      <-- constantly print on this same row & column.

Example code would be appreciated!

TIA!


-----------------------------------------------------
Anti-Spam Device in Place:

To Reply : Replace NoSPAM with stever

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



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

Date: Tue, 20 Mar 2001 21:23:07 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Print To Same Line - No Carriage Return
Message-Id: <3AB7CBD4.6DFEF557@acm.org>

Steve Reiss wrote:
> 
> All,
> 
> I need to print out the progress of an operation as it iterates
> through its loop.  I want to print this out on the same line so there
> is no advancement of the row & column.
> 
> In other words, how do I print to the same row & column without a
> carriage return?
> 
> example :
> 
>  Loop = n      <-- constantly print on this same row & column.

This should work depending on your terminal:
print "\rLoop = $n  ";


John
-- 
use Perl;
program
fulfillment


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

Date: Tue, 20 Mar 2001 22:58:27 GMT
From: trammell@bayazid.hypersloth.invalid (John Joseph Trammell)
Subject: Re: Print To Same Line - No Carriage Return
Message-Id: <slrn9bflpo.35o.trammell@bayazid.hypersloth.net>

On Tue, 20 Mar 2001 20:46:10 GMT, Steve Reiss <NoSPAM@netmind.com> wrote:
> All,
> 
> I need to print out the progress of an operation as it iterates
> through its loop.  I want to print this out on the same line so there
> is no advancement of the row & column.
> 
> In other words, how do I print to the same row & column without a
> carriage return?

No, you want a carriage return, but no *newline*.  Try this:

  #!/usr/bin/perl -w
  use strict;
  print "++++++++++ foo\r";
  print "abcdefghij\n";



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

Date: Tue, 20 Mar 2001 19:17:39 +0000
From: Greg Griffiths <greg2@surfaid.org>
To: Francois Richard <richard@science.uottawa.ca>
Subject: Re: Q: usernames & passwords - how to ???
Message-Id: <3AB7ACD3.338E1B7D@surfaid.org>

You'll definitely need some sort of server side component, ASP, Perl, PHP
etc. You may also need a database as well. If you only want simple security,
check out cookies.

Francois Richard wrote:

> (sorry for cross-posting, but I'm really shooting in the dark: I have no
> idea where to start with this!)
>
> Can someone please point me in the right direction (FAQ, web resources,
> etc.)?
>
> I want to create a simple web page that allows guests to the web site to
> enter a userid and password, and store these with their names in a text
> or database file on our server.
>
> What is the best way to do this? Does it involve JavaScript alone, or a
> combination with other tools (CGI, Perl, Java, etc.)?
>
> I have looked for info on the internet, but so far this is proving to be
> a very frustrating experience... I would greatly appreciate any
> pointers/advice you may have.
>
> Cheers,
> _________________________________________________
> François Richard  -  Earth Sciences
> University of Ottawa (Canada)



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

Date: Tue, 20 Mar 2001 20:19:05 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Script for mail forwarding?
Message-Id: <slrn9bfepp.2bu.abigail@tsathoggua.rlyeh.net>

Randal L. Schwartz (merlyn@stonehenge.com) wrote on MMDCCLVIII September
MCMXCIII in <URL:news:m1snk8s5c2.fsf@halfdome.holdit.com>:
-- >>>>> "Rand" == Rand Simberg <simberg@interglobal.org> writes:
--
-- Rand> Can I configure/use that if I'm not root?  The whole point is to
-- Rand> avoid the $2/month ISP charges for the mailbox forwards that I
-- Rand> have to pay now.  I was looking for a script that I can just run
-- Rand> on my own incoming mail--not for the entire server.
--
-- It's possible to get envelope-to, provided the setup is right, and in
-- fact procmail is the *only* way to do it for some ISPs (like mine).
--
-- What you need to do is ask your ISP "how can I get envelope-to".  If
-- they give you the scooby-do "hunnh?" look, you have a lame ISP --
-- change.


Well, not everyone wants the envelope-to. It's only when you merge to
many addresses to a single box that you need that - don't do that. ;-) I
couldn't care less, because if the envelope-to isn't what it needs
to be, it doesn't get in my mailbox in the first place. After all, sorting
out the envelopes and delivering it to a box is the MTAs task. Furthermore,
many MTAs put the envelop-to in the Received: line. If you local MTA
does this, you have access. Note that envelope-to's change if something
is forwarded, while To: typically isn't.

And then there are Original-To, Resent-To, Apparently-To,
Apparently-Resent-To, and X-Envelope headers.

And if your MTA is qmail, you have a whole bunch of environment variables
for various envelope variables. Not to mention the Delivered-To header.
But qmail has a dedicated manpage to talk about envelopes.


Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


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

Date: Tue, 20 Mar 2001 22:44:01 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Short Course Announcement
Message-Id: <x7d7bc3vta.fsf@home.sysarch.com>

>>>>> "SV" == Sally Verkaik <s.verkaik@ic.ac.uk> writes:

  SV> High Frequency CMOS & Bipolar Design @ Imperial College, London,

anyone who is stupid enough to post about a CMOS design course in a perl
newsgroup, probably isn't bright enough to teach a good course.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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


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