[11751] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5351 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 11 01:07:27 1999

Date: Sat, 10 Apr 99 22:00:18 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 10 Apr 1999     Volume: 8 Number: 5351

Today's topics:
    Re: convert IP to country of origin (Peter L. Berghold)
    Re: convert IP to country of origin (Peter L. Berghold)
    Re: Count Linenumber (Larry Rosler)
    Re: Count Linenumber <thelma@alpha2.csd.uwm.edu>
    Re: Count Linenumber (Matthew Bafford)
    Re: Count Linenumber (Bill Moseley)
    Re: Count Linenumber (Bill Moseley)
    Re: Count Linenumber <uri@home.sysarch.com>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?)  <dank@alumni.caltech.edu>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) <dank@alumni.caltech.edu>
    Re: Don't you have to work? <mpersico@erols.com>
        grep -n equivalent? (Ran)
    Re: How Do I Declare A Hash Without Errors? (Danny Chang)
    Re: Is it possible to have "..." appear while processin (Tad McClellan)
    Re: Is it possible to have "..." appear while processin (I R A Aggie)
        newbie to Perl <kenmar@ihug.co.nz>
    Re: Perl as a first programming language - suitability, (Peter L. Berghold)
    Re: Perl IDE/GUI for Linux (Peter L. Berghold)
        perl script to swap the first two columns of the file / <t0.ho@student.qut.edu.au>
    Re: perl script to swap the first two columns of the fi <uri@home.sysarch.com>
    Re: perl script to swap the first two columns of the fi (I R A Aggie)
    Re: Privacy for slaves forced to use a proxy/firewall t (Peter L. Berghold)
    Re: Privacy for slaves forced to use a proxy/firewall t (Luca Filipozzi)
    Re: random number ( -w ) (Peter L. Berghold)
    Re: system problem (Peter L. Berghold)
    Re: verifying programs can execute (Peter L. Berghold)
        which arguement to File::find?? (Peter Bismuti)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 11 Apr 1999 02:22:05 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: convert IP to country of origin
Message-Id: <hHTP2.981$VC2.894@news.rdc1.nj.home.com>

In article <7eg8g3$gnk$1@nnrp1.dejanews.com>, nguyen.van@imvi.bls.com says...
>
>Hello everyone,
>
>I just wonder there is any way to convert IP address to country of origin. Is

So far as I can recollect there isn't a mapping between IP addresses and 
countries....  I could be wrong...

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sun, 11 Apr 1999 02:23:33 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: convert IP to country of origin
Message-Id: <FITP2.982$VC2.894@news.rdc1.nj.home.com>

In article <brian-ya02408000R0804991246540001@news.panix.com>, brian@pm.org 
says...
>
>not as a standard it doesn't, but you can tell who is assigned 
>which IP blocks.  Netscape does this to track where their 128 bit
>software goes :)
Brian,

Don't they do some sort of whois lookup and process off of that? Now that I've 
seen the original post, I'm intrigued with the problem....

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sat, 10 Apr 1999 17:59:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Count Linenumber
Message-Id: <MPG.117993c0504df2f1989889@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <370FD664.4B6F484A@xs4all.nl> on Sun, 11 Apr 1999 00:53:24 
+0200, Frank de Bot <debot@xs4all.nl >says...
> How can I count the number of lines  WITHOUT a loop in a file?

You cannot.

The following is the shortest code I can think of:

    0 while <FILE>;
    print "$.\n";

This reads the file and prints the line number of the last line.

> and how can I count the number of lines WITHOUT a loop that are
> containing something in a file?

You cannot.

    $matches = grep /something/, <FILE>;

The loop is there; you just can't see it.

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


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

Date: 11 Apr 1999 02:25:55 GMT
From: Thelma Lubkin <thelma@alpha2.csd.uwm.edu>
Subject: Re: Count Linenumber
Message-Id: <7ep17j$6i1$1@uwm.edu>

Larry Rosler <lr@hpl.hp.com> wrote:
: In article <370FD664.4B6F484A@xs4all.nl> on Sun, 11 Apr 1999 00:53:24 
: +0200, Frank de Bot <debot@xs4all.nl >says...
:> How can I count the number of lines  WITHOUT a loop in a file?

: You cannot.

: The following is the shortest code I can think of:

:     0 while <FILE>;
:     print "$.\n";
    
           print scalar(@lines=<FILE>)."\n";

      if you really don't want to see the loop. (...but Larry's code
      has fewer characters)
                  --thelma

: (Just Another Larry) Rosler


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

Date: Sun, 11 Apr 1999 02:27:37 GMT
From: dragons@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Count Linenumber
Message-Id: <slrn7h01pr.2oo.dragons@dragons.duesouth.net>

On Sun, 11 Apr 1999 00:53:24 +0200, Frank de Bot <debot@xs4all.nl>
lucked upon a computer, and thus typed in the following:
) How can I count the number of lines  WITHOUT a loop in a file?

Why?

But, you could do:

local $/;
$file = <>;
$lines = $file =~ tr/\n//;
print "$lines\n";

) and how can I count the number of lines WITHOUT a loop that are
) containing something in a file?

Why?

But, you could do:

local $/;
$file = <>;
$count = () = $file =~ m/^.*(something).*$/gm;
print "$count\n";

) Thanks.

I'd almost say it's September again.

Yours in bewilderment,

--Matthew


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

Date: Sat, 10 Apr 1999 19:42:05 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Count Linenumber
Message-Id: <MPG.1179abdcada8b801989727@206.184.139.132>

In article <MPG.117993c0504df2f1989889@nntp.hpl.hp.com>, lr@hpl.hp.com 
says...
> +0200, Frank de Bot <debot@xs4all.nl >says...
> > How can I count the number of lines  WITHOUT a loop in a file?
> 
> You cannot.

How about?

@lines = <FILE>;
print scalar @lines;




-- 
Bill Moseley mailto:moseley@best.com


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

Date: Sat, 10 Apr 1999 19:52:17 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Count Linenumber
Message-Id: <MPG.1179ae3d538286de989728@206.184.139.132>

In article <MPG.117993c0504df2f1989889@nntp.hpl.hp.com>, lr@hpl.hp.com 
says...
> You cannot.

I should have said:

print scalar @{[<FILE>]};

Obviously, there must be a loop there.

-- 
Bill Moseley mailto:moseley@best.com


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

Date: 10 Apr 1999 23:39:12 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Count Linenumber
Message-Id: <x7aewfrfkv.fsf@home.sysarch.com>

>>>>> "TL" == Thelma Lubkin <thelma@alpha2.csd.uwm.edu> writes:

  TL> Larry Rosler <lr@hpl.hp.com> wrote:
  TL> : In article <370FD664.4B6F484A@xs4all.nl> on Sun, 11 Apr 1999 00:53:24 
  TL> : +0200, Frank de Bot <debot@xs4all.nl >says...
  TL> :> How can I count the number of lines  WITHOUT a loop in a file?

  TL> : You cannot.

  TL> : The following is the shortest code I can think of:

  TL> :     0 while <FILE>;
  TL> :     print "$.\n";
    
  TL>            print scalar(@lines=<FILE>)."\n";

but that reads the whole file into memory which can waste a lot of
memory and time.

abigail had one of those bizarre one using the internal -n loop
construct in a one liner that was the shortest version of line
counting. a longer version is something like:

perl -ne 'END{print "$.\n"'}'

or you could just use wc!

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Sun, 11 Apr 1999 01:43:21 +0000
From: Dan Kegel <dank@alumni.caltech.edu>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?) 
Message-Id: <370FFE39.3BE34238@alumni.caltech.edu>

In article http://www.dejanews.com/getdoc.xp?AN=351186300
Clinton A. Pierce  <cpierce1@ford.com> wrote:
> A LOT of very clueful people get lost in CPAN the 
> first few times, when installing non-trivial modules manually.  ...
> New people RTFM or are told to use CPAN by c.l.p.m.  New people try to 
> use CPAN, and if CPAN.pm doesn't work right (100%) there's NO reasonable
> fallback mechanism.

I guess I can confirm this :-(

I'm trying to install Apache and mod_perl.  Everything went
fine until 'make test' in mod_perl.  At that point, I descended
into CPAN hell.
Currently, I'm stuck because I can't install LWP.  Doing
  install Bundle::LWP
yields the error
  Can't locate URI/URL.pm in @INC
  ...
  Bundle summary: The following items seem to have had installation
problems:
  URI LWP 

and I can't for the life of me find URI.  find / -name URL.pm doesn't
find it.  CPAN is no help.
  m /URI/   
shows (among others)
Module          Apache::URI     (DOUGM/mod_perl-1.19.tar.gz)
Module          URI             (N/A)
Module          URI::Escape     (Contact Author The libwww-perl mailing
list <libwww-perl@ics.uci.edu>)
Module          URI::URL        (Contact Author The libwww-perl mailing
list <libwww-perl@ics.uci.edu>)
  install URI
doesn't work, nor does
  install Module::URI
  install Bundle::URI
  install URI::URL
  install Apache::URI
(the latter of course turned out to be another way to install mod_perl
 and demonstrate the lack of LWP).

I did learn a few things that might actually be true, but I'm not sure:

1. If CPAN hurts itself, do 'rm -rf /root/.cpan' to start over
2. If you have trouble fetching a file during a CPAN install,
   the CPAN archives you picked may be out of date.
   This happened to me; several CPAN sites only had the .6 version
   of something that CPAN kept trying to download the .7 version of.
   Do a web search for the filename in question to find a CPAN
   mirror that has the file in question, and add it to the
   urllist with 'o conf urllist shift ftp://new.site.foo'

Questions unanswered:
1. Where to find URI
2. How to change the urllist permanently.  rm -rf /root/.cpan
   doesn't wipe out the old values, even...

Whimper... maybe I should just go download an RPM with this stuff
already compiled.  RPM, come to think of it, is a culture just
like CPAN.  The CPAN community might look at how RPM's are indexed
and dependency-checked to see if they're missing any good ideas.
- Dan


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

Date: Sun, 11 Apr 1999 04:04:43 +0000
From: Dan Kegel <dank@alumni.caltech.edu>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <37101F5A.80EECEE3@alumni.caltech.edu>

[Summary:
Problem solved.  Thanks.  CPAN needs some polish, but there's
nothing like a helping hand.]

Otis Gospodnetic wrote:
> > and I can't for the life of me find URI.  

> i /URI/ yields, among other things:
> Module          URI             (GAAS/URI-1.02.tar.gz)
> ...
> 
> > 2. How to change the urllist permanently.  ...
> I believe there is CPAN/Config.pm file where this may be stored....

Yes! Editing /usr/local/lib/perl5/5.00503/CPAN/Config.pm
to point to a good CPAN archive instead of the bogus ones
CPAN gave me when I installed it, and then doing 'reload index',
fixed it so I could find and download URI.
(Oddly, though, I saw two matches for URI: the one you expected,
and another one, 
  Module          uri             (L/LD/LDACHARY/URIC-2.02.tar.gz)
Fortunately, that one didn't get loaded.)

Suggestion: the script that shows the first-time CPAN user
the list of CPAN mirror sites should optionally check the mirror sites
to make sure they don't suck somehow.

> > Whimper... maybe I should just go download an RPM with this stuff
> > already compiled.  RPM, come to think of it, is a culture just
> > like CPAN.  The CPAN community might look at how RPM's are indexed
> > and dependency-checked to see if they're missing any good ideas.
> 
> maybe - don't know enough about RPMs although I know that I cannot download
> an RPM from a web server (http://..... .rpm) but only an FTP one (ftp:// ...
> .rpm) and most RPMs seem to be distributed via the former. I never
> understood that.

Too true.  .rpm (the suffix) has been taken by some streaming audio
format, I think.  Web sites that serve them should set up their
MIME type table differently.  Messy.

Thanks,
Dan


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

Date: Sat, 10 Apr 1999 23:14:29 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Don't you have to work?
Message-Id: <37101395.221E818A@erols.com>

Ran wrote:
> 
> In <370EAA7F.6396A541@erols.com>, "Matthew O. Persico" <mpersico@erols.com> writes:
> 
> >His personality was fetching and it was a break from the usual geek-oid
> >sterotypical behaviors (See billg@microsoft.com)
> 
> No,  it's Larry's behavior that's "the usual geek-oid":  Bill's is that
> of "the usual marketroid"...
> 
> Ran

Yes, you are right of course. I sit corrected (broken pinky toe, caught it on the playpen this morning. ;-)
-- 
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2


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

Date: 11 Apr 1999 01:40:09 GMT
From: ran@netgate.net    (Ran)
Subject: grep -n equivalent?
Message-Id: <7eouhp$if0$3@remarQ.com>

I've already figured out a different way to do this (that's probably
even a better one for this particular application), but it it occurred
to me that it would be an extremely nifty way of doing "fuzzy" table
lookups (particularly when there's likely to be more than one match):
an option/variant of the grep function that returned the indices of the
matched list elements, instead of the elements, themselves.

Just something to kick around next time the subject of language 
enhancements comes up...

Ran




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

Date: 10 Apr 1999 20:44:03 -0500
From: danny@see.the.message (Danny Chang)
Subject: Re: How Do I Declare A Hash Without Errors?
Message-Id: <370ffd5e.1199741@news3.newscene.com>

On Fri, 09 Apr 1999 21:42:05 -0400, "Matthew O. Persico"
<mpersico@erols.com> wrote:

>Hashes for Dummies, from a former Dummy:
><...snipped...>

That's a great elucidation of hashes. Thanks for the info!

Danny Chang
danny@heartmind.org


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

Date: Sat, 10 Apr 1999 16:56:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Is it possible to have "..." appear while processing?
Message-Id: <pudoe7.kd1.ln@magna.metronet.com>

Poohba (poohba@io.com) wrote:
: If so how?...


   Sure.

   You sprinkle 

      print '.';

   statements in amongst the long-running code.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 11 Apr 1999 02:31:29 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is it possible to have "..." appear while processing?
Message-Id: <slrn7h02gt.rq.fl_aggie@stat.fsu.edu>

On Sat, 10 Apr 1999 10:50:37 -0500, Poohba <poohba@io.com>, in
<Pine.BSF.4.05.9904101039090.19025-100000@schultz.io.com> wrote:

+ I say ... i mean the dots keep coming til program is complete.

while($some_long_assed_loop) {
    print ".";
    something;
    another;
    and_another;
}
print "finished!\n";

James


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

Date: Mon, 12 Apr 1999 12:19:25 +0800
From: Ken Mar <kenmar@ihug.co.nz>
Subject: newbie to Perl
Message-Id: <3711744D.4D227619@ihug.co.nz>

Greetings all,
 I hv this script written presumably for Unix environ. Tried to run it
in win32 got this err msg:

   Died at segment.pl line 5. #segment.pl is the script run.

Below is the code:

#!/usr/bin/perl

require "segmenter.pl";

die if $#ARGV == -1;

$outfile = $ARGV[0];
$outfile =~ s/\..+$/\.seg/i;
open(OUT, "> $outfile") or die "Can't open segmentation output file\n";
open(TXT, $ARGV[0]) or die "Can't open input file.\n";

while ($line = <TXT>) {
    print OUT segmentline($line);
}
close(TXT);
close(OUT);

-----------------end of segment.pl---------------

Can gurus out there shed some light how to fix the prob?

Regards.

-Ken


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

Date: Sun, 11 Apr 1999 02:08:03 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: Perl as a first programming language - suitability, good books ?
Message-Id: <7uTP2.979$VC2.894@news.rdc1.nj.home.com>

In article <7eg7c9$8ep$2@client2.news.psi.net>, abigail@fnx.com says...
>

>I wouldn't suggest Perl as a first language. Perl already proves to be
>confusing enough for many people that do know other language.
>

Abigail!  You of all people surprise me with that answer! 

I have several people in my shop that are not programmers per se that are doing 
just fine learning Perl as their first programming language.  If you really 
want to learn a programming language it really doesn't matter which is your 
first one...


-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sun, 11 Apr 1999 02:00:59 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: Perl IDE/GUI for Linux
Message-Id: <vnTP2.978$VC2.894@news.rdc1.nj.home.com>

In article <7eervo$sbe$1@fe1.cs.interbusiness.it>, sauro@fol.it says...
>
>Hi,
>Where I find Perl IDE or GUI on Linux ?
>

emacs file.pl

as long as you have the cperl extentions you are going to be OK.  

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sun, 11 Apr 1999 11:47:42 +1000
From: "Jonathan Ho" <t0.ho@student.qut.edu.au>
Subject: perl script to swap the first two columns of the file /etc/hosts
Message-Id: <7eov18$uch$1@dove.qut.edu.au>

How do i write a perl script to swap the first two columns of the file
/etc/hosts?

regards




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

Date: 10 Apr 1999 23:43:13 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: perl script to swap the first two columns of the file /etc/hosts
Message-Id: <x77lrjrfe6.fsf@home.sysarch.com>

>>>>> "JH" == Jonathan Ho <t0.ho@student.qut.edu.au> writes:

  JH> How do i write a perl script to swap the first two columns of the file
  JH> /etc/hosts?

one of the few times awk is simpler!

awk '{print $2,$1}' /etc/hosts

the perl equivilent is:

perl -ane 'print "@F[1,0]\n"' /etc/hosts

hth,

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 11 Apr 1999 03:52:19 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: perl script to swap the first two columns of the file /etc/hosts
Message-Id: <slrn7h078f.1t6.fl_aggie@stat.fsu.edu>

On 10 Apr 1999 23:43:13 -0400, Uri Guttman
<uri@home.sysarch.com>, in <x77lrjrfe6.fsf@home.sysarch.com> wrote:

+ one of the few times awk is simpler!

'awk' has to be better at something... ;)

James


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

Date: Sun, 11 Apr 1999 02:48:01 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <B3UP2.986$VC2.894@news.rdc1.nj.home.com>

In article <7ejo4g$g5a$1@nnrp1.dejanews.com>, foj@nym.alias.net says...
>

>Blah blah blah. Those behind the firewalls & proxies in various countries &
>companies who agree with me know the real story. No net access by adults
>should be censored. If an employee is doing his work, then the rest is what

On your time, on your equipment, and on your bandwidth I agree with you. 
Providing you are not breaking any local, state, or federal laws. 

I'm another admin that can add voice to the fact that there are those who spend 
all day on the net running Pointcast or whatever else chewing up bandwidth and 
causing others to complain that the firewall is slow.  Well tough noogies. 

I am just the sort of SOB who will broadcast to the rest of the world who is 
using up that bandwidth and allow peer pressure to do its job. 

Another case in point is the poor help desk person who was attempting to use 
SMS to connect to someones Windoze NT box to help them with a problem.  She 
accidently connected to someone else's PC and got herself an eyefull of kiddie 
porn.  This very nice young lady was traumatized by this because she always 
felt that she was safe from having to see this sort of thing in a work 
environment. Yet there it was someone on COMPANY TIME, drawing a paycheck, was 
using COMPANY EQUIPMENT, to enjoy his sick form of entertainment. 

No, I don't agree with you that you should be allowed to do anything you want 
with network access at your employer's expense.  I have wasted more of my time 
having to hunt people down who where abusing the privelige of an Internet 
connection that I HAD TO FIGHT WITH MANAGEMENT TO GET IN THE FIRST PLACE to 
have any sympathy with that sort of argument. 


-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sat, 10 Apr 1999 20:17:55 -0700
From: lucanntp@ise.bc.ca.spamsucks (Luca Filipozzi)
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <MPG.1179b44333de3a54989785@news.bctel.net>

In article <B3UP2.986$VC2.894@news.rdc1.nj.home.com>, Peter@Berghold.Net 
says...
> In article <7ejo4g$g5a$1@nnrp1.dejanews.com>, foj@nym.alias.net says...
> >
> 
> >Blah blah blah. Those behind the firewalls & proxies in various countries &
> >companies who agree with me know the real story. No net access by adults
> >should be censored. If an employee is doing his work, then the rest is what
> 
> On your time, on your equipment, and on your bandwidth I agree with you. 
> Providing you are not breaking any local, state, or federal laws. 
> 
> I'm another admin that can add voice to the fact that there are those who spend 
> all day on the net running Pointcast or whatever else chewing up bandwidth and 
> causing others to complain that the firewall is slow.  Well tough noogies. 
> 
> I am just the sort of SOB who will broadcast to the rest of the world who is 
> using up that bandwidth and allow peer pressure to do its job. 
> 
> Another case in point is the poor help desk person who was attempting to use 
> SMS to connect to someones Windoze NT box to help them with a problem.  She 
> accidently connected to someone else's PC and got herself an eyefull of kiddie 
> porn.  This very nice young lady was traumatized by this because she always 
> felt that she was safe from having to see this sort of thing in a work 
> environment. Yet there it was someone on COMPANY TIME, drawing a paycheck, was 
> using COMPANY EQUIPMENT, to enjoy his sick form of entertainment. 
> 
> No, I don't agree with you that you should be allowed to do anything you want 
> with network access at your employer's expense.  I have wasted more of my time 
> having to hunt people down who where abusing the privelige of an Internet 
> connection that I HAD TO FIGHT WITH MANAGEMENT TO GET IN THE FIRST PLACE to 
> have any sympathy with that sort of argument. 
> 
> 
> 
I completely agree. 

It is not the employers responsibility to provide access to the Internet 
for her/his employees.

Further, if the employer does provide access (because there is a good 
business reason to do so), then she/he is not required to provide 
online privacy to her/his employees.

Get real.

-- 
Luca Filipozzi <lucanntp@ise.bc.ca.spamsucks>


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

Date: Sun, 11 Apr 1999 01:55:17 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: random number ( -w )
Message-Id: <9iTP2.977$VC2.894@news.rdc1.nj.home.com>

In article <ugDO2.273$xI5.10326@typhoon.nycap.rr.com>, indexfinger@usa.net 
says...
>
>> #!usr/bin/perl -w
>
>
>What does the "-w" do?
>

It will allow the interpreter to issue warnings if it feels a need... 

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sun, 11 Apr 1999 02:12:16 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: system problem
Message-Id: <4yTP2.980$VC2.894@news.rdc1.nj.home.com>

In article <370B2B14.496FF83E@ust.hk>, mecks@ust.hk says...
>

>If I write in PERL
>    system("graph.csh 1 1 DATA > test");
>it don't work. And the most strange thing is that
>it blamed on my csh script and said error on the
>csh script which it run ok on csh.
>
>   I know that PERL call up the sh but not csh.
>Did it causes the problem?
>


I think you are on to what the problem is and don't realize it.  Without 
knowing for sure how the csh script was written I would suspect that it doesn't 
start with a "shebang" to ensure that it is running in the csh when it is 
executed. 

In case you don't know it already, make sure the first line of the csh script 
looks like the line between the "snip heres:"
---------8< snip here
#!/bin/csh
---------8< snip here

Also make sure the script is executable and is in your PATH. 

HTH

-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: Sun, 11 Apr 1999 02:29:02 GMT
From: Peter@Berghold.Net (Peter L. Berghold)
Subject: Re: verifying programs can execute
Message-Id: <ONTP2.983$VC2.894@news.rdc1.nj.home.com>

In article <370ba907.18461806@news.bmc.com>, christianarandaOUT@OUTyahoo.com 
says...

>line.  There must be a better way to accomplish this.  Or perhaps I've

Well... here's how I'd tackle the problem.  No claims to this being the best 
way...

--------8< Snip! 8<---------------------------------------

#!/usr/bin/perl
##############################################

@progs=qw( tar cpio rsh ftp );  # and more as you need them
@pathdirs=split(':',$ENV{PATH}); # Check the path for each variable
@progHomes=();

foreach $prog(@progs){
	foreach $dir(@pathdirs){
		if ( -x "$dir/$prog" ) {
			print "$prog is $dir/$prog\n";
			push(@progHomes,"$dir/$prog");
		}
	}
}

-----------------8< Snip 8<------------------------------------------


-- 
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold                        Peter@Berghold.Net
"Linux renders ships                     http://www.berghold.net
 NT renders ships useless...."           ICQ# 11455958



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

Date: 11 Apr 1999 02:36:43 GMT
From: bismuti@cs.fsu.edu (Peter Bismuti)
Subject: which arguement to File::find??
Message-Id: <7ep1rr$h20$1@news.fsu.edu>

There is are built in variables to determine what the current
values of the  directory and file are when using the 'find' 
function, but I need to know which arguement 'find' is working
on, how can I do this???  THanks!!,


find(\&wanted,arg1,arg2,arg3.....)


sub wanted{

    # which arg is 'find' currently working on?

}



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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 5351
**************************************

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