[13290] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 700 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 2 03:17:18 1999

Date: Thu, 2 Sep 1999 00:05:33 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 2 Sep 1999     Volume: 9 Number: 700

Today's topics:
    Re: Appending and Writing (Larry Rosler)
    Re: beginner in for loop (Martien Verbruggen)
    Re: Counting duplicate list elements in Perl <nospam.newton@gmx.net>
    Re: Counting duplicate list elements in Perl <uri@sysarch.com>
        finding disk/drive size <alister2NObgSPAM@csc.co.nz>
    Re: finding disk/drive size (Martien Verbruggen)
        How do I do this.... <ICEMOUNTAIN@prodigy.net>
    Re: How do I pass a variable to the "use" statement? <bwalton@rochester.rr.com>
    Re: How do I pass a variable to the "use" statement? <rick.delaney@home.com>
    Re: How do I pass a variable to the "use" statement? (elephant)
    Re: Perl in Win32 ? (elephant)
    Re: Perl Jargon Question <dont_ever.spam_pvoris@earthlink.net>
    Re: Perl wrapper on NT (elephant)
    Re: Processing html on the fly <dont_ever.spam_pvoris@earthlink.net>
    Re: Question (Twarren10)
    Re: Question (Martien Verbruggen)
    Re: Question <uri@sysarch.com>
    Re: repost (PROCESS CERTAIN BLOCK OF DATA IN A FILE ? <Allan@due.net>
    Re: Simulating Carriage Returns (Larry Rosler)
    Re: SSL and Perl <arunas@an!m.org>
    Re: system <rick.delaney@home.com>
    Re: Tracking progress of a Net::FTP download (Sean McAfee)
        Using split on a variable <cain@datasync.com>
    Re: Using split on a variable (Sam Holden)
    Re: Using split on a variable (elephant)
    Re: Using split on a variable (elephant)
        Win32::AdminMisc::LogonAsUser() <la@al.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Wed, 1 Sep 1999 23:20:24 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Appending and Writing
Message-Id: <MPG.1237b6fd4f77ba89989f0b@nntp.hpl.hp.com>

In article <7qkga0$4kk@dfw-ixnews7.ix.netcom.com> on 2 Sep 1999 00:27:44 
GMT, Eric Bohlman <ebohlman@netcom.com> says...
> RICHARDS  AMANDA DAWN (richara@ecf.toronto.edu) wrote:
> : I was wondering if there would be any way besides copying the contents of
> : a file, changing them and then writing a totally new file to change some
> : (well...one) bit of information in a file (ie get rid of the old bit in
> : the file and replace it with a new bit) and also append at the same time.
> 
> It's possible only if the new "bit" is *exactly* the same size as the old
> "bit."  In that case, open the file for read/write, seek() to the spot
> where you want to make the change, print() the change, and then seek() to
> the end of the file. 

Is that last seek really necessary?  I don't think closing the file will 
truncate it to the current file position, on any OS.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 02 Sep 1999 06:39:21 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: beginner in for loop
Message-Id: <tYoz3.258$D16.15642@nsw.nnrp.telstra.net>

In article <Mulz3.124$D16.7485@nsw.nnrp.telstra.net>,
	mgjv@comdyn.com.au (Martien Verbruggen) writes:
> In article <7qkgeq$679$1@autumn.news.rcn.net>,
> 	"Ben Horowitz" <bzhaainc@erols.com> writes:

>> print "like the movie,person #$i? ":

> If that is your real code (which I doubt), you will need to fix those
> first. Then, unless you use an array @i somewhere, you will need to
> fix that $#i.

Euhm, misread that one. No problem with the #$i (not $#i).

The rest stands.

-- 
Martien Verbruggen                  | 
Interactive Media Division          | Failure is not an option. It comes
Commercial Dynamics Pty. Ltd.       | bundled with your Microsoft product.
NSW, Australia                      | 


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

Date: Thu, 02 Sep 1999 08:41:39 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Counting duplicate list elements in Perl
Message-Id: <37CE1C23.FDFC6CFF@gmx.net>

Uri Guttman wrote:
> 
> a little perl golf here
> 
> perl -lne '$c{$_}++; END{print "$_,$c{$_}" for sort keys %c}'

  perl -lne '$c{$_}++;END{print"$_,$c{$_}"for sort keys%c}'

Four fewer strokes! (And no closing -n loop with }, either!) Do I get a
prize? (Tested, too!)

Cheers,
Philip


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

Date: 02 Sep 1999 02:44:07 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Counting duplicate list elements in Perl
Message-Id: <x7n1v5u820.fsf@home.sysarch.com>

>>>>> "P'tmaN" == Philip 'Yes, that's my address' Newton <nospam.newton@gmx.net> writes:

  P'tmaN> Uri Guttman wrote:
  >> 
  >> a little perl golf here
  >> 
  >> perl -lne '$c{$_}++; END{print "$_,$c{$_}" for sort keys %c}'

  P'tmaN>   perl -lne '$c{$_}++;END{print"$_,$c{$_}"for sort keys%c}'

  P'tmaN> Four fewer strokes! (And no closing -n loop with }, either!)
  Do I get a P'tmaN> prize? (Tested, too!)

oh, squeezing whitespace out is so hard! thank you or i would never had
seen how to do that.

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
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Wed, 01 Sep 1999 20:16:43 +1700
From: Aaron Lister <alister2NObgSPAM@csc.co.nz>
Subject: finding disk/drive size
Message-Id: <00844d40.53d45e93@usw-ex0102-013.remarq.com>

I know there are various directory modules etc
but is there anything that will allow me to extract the size 
of a disk or drive and the space used/unused for that 
disk/drive?


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Thu, 02 Sep 1999 06:41:04 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: finding disk/drive size
Message-Id: <4_oz3.260$D16.15642@nsw.nnrp.telstra.net>

In article <00844d40.53d45e93@usw-ex0102-013.remarq.com>,
	Aaron Lister <alister2NObgSPAM@csc.co.nz> writes:
> I know there are various directory modules etc
> but is there anything that will allow me to extract the size 
> of a disk or drive and the space used/unused for that 
> disk/drive?

Search this group on dejanews for the words disk and size. There have
been many of these posts in the past.

Use the archive, Luke.

MArtien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Thu, 2 Sep 1999 00:56:55 -0400
From: <ICEMOUNTAIN@prodigy.net>
Subject: How do I do this....
Message-Id: <7ql09v$8d6o$1@newssvr04-int.news.prodigy.com>

I am making a script to display a gallery of pictures and I only want to
have 5 pictures on a page. I got a website that had an example and a very
good explanation of the script. I couldn't figure how to put it in my
script. (http://web.stonehenge.com/merlyn/WebTechniques/col02.listing.txt)
Is there another way to make only 5 pictures appear on one page or can
someone explain how I would be able to put it in my script.
My script is at (http://www.3gc.net/gallerysearch.txt)




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

Date: Wed, 01 Sep 1999 23:27:40 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: How do I pass a variable to the "use" statement?
Message-Id: <37CDEEAC.D6A05DF5@rochester.rr.com>

samingins@my-deja.com wrote:

> I wish to achieve something like the following:
>
> $module = 'my_module';
>
> use $module;
>
> As the above does not work, how can this be done?  Can this be done?
>
> Thank you in advance
>
> Shane.

 ...
One way that seems to work is like:

BEGIN{$mod='Tk';eval("use $mod;");}
$mw=new Tk::MainWindow;
$mw->Button(-text=>'boring button')->pack;
MainLoop;

Since it works with Tk, it will probably work with just about anything.  I
note that it does not work unless the "use" is eval'ed in a BEGIN block.  I
also note that perlfunc states that the argument to use must be a bareword,
which documents that "use $mod;" without an eval doesn't fly.



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

Date: Thu, 02 Sep 1999 03:54:26 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: How do I pass a variable to the "use" statement?
Message-Id: <37CDF4DA.5ABEF2B0@home.com>

[posted & mailed]

Bob Walton wrote:
> 
> BEGIN{$mod='Tk';eval("use $mod;");}
> $mw=new Tk::MainWindow;
> $mw->Button(-text=>'boring button')->pack;
> MainLoop;
> 
> Since it works with Tk, it will probably work with just about anything.  I
> note that it does not work unless the "use" is eval'ed in a BEGIN block.

It should work fine outside BEGIN for most modules.  Putting it in a
BEGIN makes it more like a "regular" use in that it happens at
compile-time, though.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Thu, 2 Sep 1999 16:04:45 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: How do I pass a variable to the "use" statement?
Message-Id: <MPG.1238be8cc8601c95989ca4@news-server>

samingins@my-deja.com writes ..
>I wish to achieve something like the following:
>
>$module = 'my_module';
>
>use $module;
>
>As the above does not work, how can this be done?  Can this be done?

effectively (possibly actually) the use() function is executed during 
compilation .. this is one if its advantages (no runtime surprises) .. 
to do what you want use 'require' in a BEGIN block instead

see the documentation on use() and require() in perlfunc and perlmod for 
information on the special BEGIN (and END) routines

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 2 Sep 1999 13:37:57 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Perl in Win32 ?
Message-Id: <MPG.12389c1fdbbe4651989ca3@news-server>

Chow Hoi Ka, Eric writes ..

>--
>     _                                                  _
>    / ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
>   / /  |                                            |  \ \
> _( /_  | _          Chow Hoi Ka, Eric             _ |  _) )_
>(((\ \> |/ )                                      ( \| </ /)))
>(\\\\ \_/ /                                        \ \_/ ////)
> \       /       E-Mail : eric138@yahoo.com         \        /
>  \    _/                                            \_     /
>  /   / |____________________________________________| \    \
> /   /                                                   \    \
>

you've got a long way to go to make it to a.f.warlord .. but you're off 
to a flying start

I liked the '--' sequence without a trailing space character .. that was 
a nice touch

die troll die .. plonk

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Wed, 01 Sep 1999 21:10:36 -0700
From: Joe Schmoe <dont_ever.spam_pvoris@earthlink.net>
Subject: Re: Perl Jargon Question
Message-Id: <37CDF8BC.283D985@earthlink.net>

Abigail, you crack me up every time.  :)



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

Date: Thu, 2 Sep 1999 13:33:35 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Perl wrapper on NT
Message-Id: <MPG.12389b1551efe422989ca2@news-server>

Paul Alan Spitalny writes ..
>Hi,
>I'm going to upgrade to using NT from Win95. When I have run Perl 5 in
>the past, I have written  .bat files with the following "wrapper:"
>
>@echo off
>perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
>goto endofperl
>#! /usr/bin/perl
>
>
>
>__END__
>:endofperl
>
>
>Then, in my autoexec.bat file  I include the location of perl.exe in the
>"PATH" variable. Then, to run a script I open the DOS prompt and type in
>the name of the script (without having to type the .bat extension).
>O.K.  I'm finally leading up to my question(s).
>
>1) Do I still need the wrapper when using PERL 5.005 on NT ?

no .. and you didn't even need it in Windows95

>2) The #! /usr/bin/perl    line in the above wrapper is useless isn't
>it? (any line starting with # is a comment, right?)

actually the above line is critical in the above wrapper .. because the 
'-x' option relies on it .. see the perlrun manual for more details on 
'-x'

also - in Win32 - while the shebang line (the #!/blah/blah/perl) line is 
ignored by the windows command shell - it's not ignored by Perl or by 
some web servers (apache being the only one I am certain of)

Perl will respond to options placed on this shebang line the same as it 
does on UNIX derivatives - although possibly for different reasons (I 
don't know whether the UNIX shells process the options - or whether perl 
does once it's handed the script file for interpretation)

assuming you're using the ActiveState distribution - there are more 
details on Perl under Win32 in the help files (available in HTML format 
from your Start menu)

>3) What exactly did the above wrapper do. I never really did understand
>it.

it's a batch command file that basically just calls perl with up to 9 
command line arguments and with the -x and -S options .. then it jumps 
to the end of your script

because of the '-x' line perl begins executing only when it comes to the 
shebang line .. and it runs your code up to the __END__

>4) To run PERL 5.005 on NT can I still NOT have to type:    "perl
>fred.bat" to run the script fred.bat from a DOS prompt?  That is, how
>does NT "know" where perl.exe lives?  My goal is to be able to type
>"fred" at the dos prompt, hopefully avoiding typing the file extension
>and the word "perl"

see the documentation for how to set perl and your system up so that NT 
can find perl .. if you had a script called fred.pl that accepted a name 
on the command line then you'd be able to run it thusly (in either Win95 
or WinNT) if your system was properly configured

  fred.pl "a name here to be passed to fred.pl"

in NT (pretty sure this is unavailable in 95) the PATHEXT environment 
variable allows you (you UNIX people will think it's funny that this is 
exciting for NT people *8^) you to configure your system so that the 
above becomes simply

  fred "a name here to be passed to fred.pl"

how to make that happen is left as an exercise to the reader

>5) Since I will run perl scripts from the DOS prompt, does that mean I
>only get 16 bit performance, or do I get 32 bit performance?

in NT there's no DOS Prompt .. there's no DOS .. if you want to know 
more about this - then you should probably ask in another forum - this 
is completely unrelated to Perl

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Wed, 01 Sep 1999 21:08:16 -0700
From: Joe Schmoe <dont_ever.spam_pvoris@earthlink.net>
Subject: Re: Processing html on the fly
Message-Id: <37CDF82F.A0F6BD03@earthlink.net>

BASE does not work in all browsers....



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

Date: 02 Sep 1999 03:28:31 GMT
From: twarren10@aol.com (Twarren10)
Subject: Re: Question
Message-Id: <19990901232831.23624.00002565@ng-fx1.aol.com>

>  chop($new_line) if $new_line =~ /\n$/;
>
> Would this do the same as chomp and be less dangerous in certain
>circumstances? or is there a problem with this also? Thanks!

Yes


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

Date: Thu, 02 Sep 1999 06:51:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Question
Message-Id: <68pz3.268$D16.15642@nsw.nnrp.telstra.net>

In article <19990901232831.23624.00002565@ng-fx1.aol.com>,
	twarren10@aol.com (Twarren10) writes:
>>  chop($new_line) if $new_line =~ /\n$/;
>>
>> Would this do the same as chomp and be less dangerous in certain
>>circumstances? or is there a problem with this also? Thanks!
> 
> Yes

No, it would not do the same as chomp.

# perldoc -f chomp
[snip]
It removes any line ending that corresponds to the current value of
C<$/> (also known as $INPUT_RECORD_SEPARATOR in the C<English>
module).
[snip]

Which makes chomp a lot better in many ways than chop can be,
especially if $/ contains more than one character.

Martien
-- 
Martien Verbruggen                  | 
Interactive Media Division          | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd.       | make up 3/4 of the population.
NSW, Australia                      | 


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

Date: 02 Sep 1999 02:59:13 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Question
Message-Id: <x7k8q9u7cu.fsf@home.sysarch.com>

>>>>> "MV" == Martien Verbruggen <mgjv@comdyn.com.au> writes:

  MV> In article <19990901232831.23624.00002565@ng-fx1.aol.com>,
  MV> 	twarren10@aol.com (Twarren10) writes:
  >>> chop($new_line) if $new_line =~ /\n$/;

  MV> Which makes chomp a lot better in many ways than chop can be,
  MV> especially if $/ contains more than one character.

plus chomp is a lot faster as it stays in the perl core instead of
executing the silly regex and chop in perl as shown above. why on earth
would someone write a chomp in terms of chop?

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
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Wed, 1 Sep 1999 16:05:27 -0400
From: "Allan M. Due" <Allan@due.net>
Subject: Re: repost (PROCESS CERTAIN BLOCK OF DATA IN A FILE ?
Message-Id: <7qk14a$bke$1@nntp2.atl.mindspring.net>

tvn007@my-deja.com wrote in message <7qjtv8$1rn$1@nnrp1.deja.com>...
[snippage]
: Would someone please help me on this ?
: How do I modify the script file above so that it can start process the
:data only starting at line 3 and stop at line 4 by using
:":symbol" at the starting point and "))" at ending point

And you reposted it an hour later because?

Check out the range (or flip-flop) operator.

Look under Range Operators in perlop.

HTH

AmD

--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila.
- Mitch Ratliffe






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

Date: Wed, 1 Sep 1999 23:06:02 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simulating Carriage Returns
Message-Id: <MPG.1237b39a1232e8e6989f0a@nntp.hpl.hp.com>

In article <slrn7sra16.88s.*@dragons.duesouth.net> on Wed, 01 Sep 1999 
22:40:08 GMT, Matthew Bafford <*@dragons.duesouth.net> says...
> And so it happened, on Wed, 1 Sep 1999 13:46:06 -0700, Larry Rosler)
> typed random characters into perl, and ended up with the following
> posted to comp.lang.perl.misc: 
> : In article <7c671uig30.fsf@ets02.jpl.nasa.gov> on 01 Sep 1999 12:31:31 -
> : 0700, Bryan D Howard <bryan@ets02.jpl.nasa.gov> says...
> : ... 
> : > % perl -e '@f=(localtime)[3..5]; $f[1]++; $f[2] += 1900;
> : >           printf "%04d-%02d-%02d\n", reverse @f;'
> :                      ^^
> : That '04' is to ensure printing four digits should $f[2] be less than
> : -900, for example, -901.  :-)
> 
> Huh?  I'm afraid I don't follow what you're saying.
> 
> The 0 ensures that the number will be padded with 0s if it is less than 4
> digits wide, thus 4 becomes 0004, 444 becomes 0444, and 4444 becomes
> 4444.

If the number is fewer than four digits, the year will be 999 CE, which 
is rather a bit before the Unix Epoch.  localtime() cannot produce a 
year before 1901 (1900 + $f[2]).

> In this case %4d, or even %d would be sufficient for a little while.
> Even after the brief period had passed, 10000 would be printed, so no
> data would be lost.

You might concerned about the Y2.038K problem, but not the Y10K problem.  
I must admit I'm not concerned about either of them.  (Where is the 
missing :-)?)

 ...

> Or did I just totally misunderstand what you meant?

Yes.  I think you missed the following symbol at the end of my first 
sentence (quoted above):  :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Wed, 1 Sep 1999 23:07:36 -0600
From: "Arunas Salkauskas" <arunas@an!m.org>
Subject: Re: SSL and Perl
Message-Id: <37ce0623@news.cadvision.com>

Considering that you'll have to setup a SSL connection with the remote
server, you'll need SSLeay or something similar - remember the information
has to be encrypted and you will have to decrypt what ever comes back.

--
--
- Arunas Salkauskas
High Point Designs
www.highpointdesigns.com

RLD wrote in message <7qjnev$4ts$1@hyperion.nitco.com>...
>Hello,
>
>Trying to design a script that will in the background pass payment
>information from a secure server to a secure server ( processing site ).
>
>Can anyone lend a hand in how I would accomplish this?  All I've seen
>available so far is Net::SSLeay which I guess is what I need, however
>installing the modules has proven to be a nightmare... is there another
way?
>Can LWP modules be tweaked possibly to allow for this type of Post?
>
>Please CC my email wasi@netnitco.net if you can.
>
>Thank you,
>RL
>
>




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

Date: Thu, 02 Sep 1999 03:59:19 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: system
Message-Id: <37CDF605.F7D376ED@home.com>

[posted & mailed]

G.P. Singh wrote:
> 
> how i use to system"" to add a user
> $user=<STDIN>;
> $group=<STDIN>;
> system "useradd -g $group $user"
> 
> it gives an error.

Why are you keeping the error a secret?  Hints:

1.  Replace system with print
2.  perldoc -f chomp

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Thu, 02 Sep 1999 05:19:00 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Tracking progress of a Net::FTP download
Message-Id: <8Nnz3.4356$J72.954129@news.itd.umich.edu>

In article <37CD8EB7.83E14042@nospam.virgin.net>,
cb  <ecliptica.ww@nospam.virgin.net> wrote:
>The Net::FTP $ftp->get() method can also take a local filename as the second,
>so what I may try is constructing a subroutine to do the same sort of thing as
>is being done in the lwp cookbook with $ua->request() but passing it into
>$ftp->get(). I can't (perhaps in naivety) see any reason why that shouldn't
>work. It's certainly worth a try, and looks a lot easier than messing about
>with all that signal handling stuff!!

As previously mentioned, this won't work simply because Net::FTP wasn't
programmed to work this way.

I wrote a nifty little tied filehandle class that prints status messages as
it's written to, but unfortunately Net::FTP inexplicably insists that the
second argument to get() must be either a filename or a filehandle with an
honest-to-God open file descriptor at the other end.  So this:

tie *FTPDEST, 'TrackFTP', 'local_file';
$ftp->get("remote_file", \*FTPDEST);

 ...won't work.

I'm of the opinion that Net::FTP ought to meekly accept any glob ref I pass
it as a second parameter, and simply write to it without doing any further
checking of its own.  Is anyone who's reading this in a position to do
anything about it, and do they agree or disagree?  Or should I take this to
c.l.p.modules?

-- 
Sean McAfee                                                mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!


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

Date: Thu, 02 Sep 1999 00:50:19 -0500
From: George Taylor <cain@datasync.com>
Subject: Using split on a variable
Message-Id: <37CE101B.7D9037C8@datasync.com>

Is is possible to "split" a variable in perl?  This is my attempt thus
far.

@varione = split {/./, {$ENV'REMOTE_HOST'}};

George



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

Date: 2 Sep 1999 06:07:03 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Using split on a variable
Message-Id: <slrn7ss51j.93s.sholden@pgrad.cs.usyd.edu.au>

On Thu, 02 Sep 1999 00:50:19 -0500, George Taylor <cain@datasync.com> wrote:
>Is is possible to "split" a variable in perl? 

Yes.

>This is my attempt thus
>far.
>
>@varione = split {/./, {$ENV'REMOTE_HOST'}};

Wrong in a number of ways... post code that actually compiles instead of just
giving error messages and someone might help you with your misunderstanding 
of split and '.' and how to call a function in perl...

I suggest reading the documentation that comes with perl. There are some
examples that use split (in the documentation about split strangely enough),
they are different then how you use split. Who do you think is likely to be
right? You, or the documentation? Learn how to read and then read
the documentation and then ask if you still can't get it to work...

-- 
Sam

compiling kernels is what I do most, so they do tend to stick to the
cache ;)	--Linus Torvalds


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

Date: Thu, 2 Sep 1999 16:14:03 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Using split on a variable
Message-Id: <MPG.1238c0ad7b4ce1d7989ca5@news-server>

George Taylor writes ..
>Is is possible to "split" a variable in perl?  This is my attempt thus
>far.
>
>@varione = split {/./, {$ENV'REMOTE_HOST'}    };
                  ^     ^^^^^^^^^^^^^^^^^^^    ^
                  |      wrong - lookup        |
                  |      hashes in perldata    |
                  |                            |
                  |                            |
  wrong - look  } |                            |
  up split() in }------------------------------
  perlfunc      }

also .. get "Learning Perl" from O'Reilly Press .. you'll need it if 
this is your attempt at calling split

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 2 Sep 1999 16:16:54 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Using split on a variable
Message-Id: <MPG.1238c15c6e5c75ec989ca6@news-server>

Sam Holden writes ..
>On Thu, 02 Sep 1999 00:50:19 -0500, George Taylor <cain@datasync.com> wrote:
-
>>@varione = split {/./, {$ENV'REMOTE_HOST'}};
>
>Wrong in a number of ways... post code that actually compiles instead of just
>giving error messages and someone might help you with your misunderstanding 
>of split and '.'
          ^^^^^^^

hee hee .. I didn't even see that one .. blinded by brilliance perhaps ?

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 2 Sep 1999 00:08:43 +0100
From: "LA" <la@al.com>
Subject: Win32::AdminMisc::LogonAsUser()
Message-Id: <37ce051a@news1.us.ibm.net>

I wrote a server script that uses Win32::AdminMisc::LogonAsUser() to
validate user passwords, and it works fine on my PC, but LogonAsUser()
doesn't seem to work on a network machine.

Does it need to run on a PDC or BDC, or should it run fine on any NT machine
in the domain?

Thanks for your help,

Louis




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

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

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 V9 Issue 700
*************************************


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