[19347] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1542 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 16 18:05:38 2001

Date: Thu, 16 Aug 2001 15:05:13 -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: <997999512-v10-i1542@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 16 Aug 2001     Volume: 10 Number: 1542

Today's topics:
    Re: ActivePerl, IIS5, Windows2000 (Jeff Walker)
        comment deletion problem (B Puli)
    Re: download.cgi, MS Ex & PDF <gnarinn@hotmail.com>
    Re: Evaluation order of object methods <djberge@uswest.com>
    Re: Evaluation order of object methods <uri@sysarch.com>
    Re: Evaluation order of object methods <djberge@uswest.com>
    Re: Evaluation order of object methods (Abigail)
        Exporting all files to a scalar/array (Nomade)
    Re: Exporting all files to a scalar/array <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Exporting all files to a scalar/array <cberry@cinenet.net>
    Re: Exporting all files to a scalar/array <cberry@cinenet.net>
    Re: Exporting all files to a scalar/array <joe+usenet@sunstarsys.com>
        FAQ: How can I tell whether there's a character waiting <faq@denver.pm.org>
    Re: File Locations <joe+usenet@sunstarsys.com>
        Help!  Multiple line extract from file based on user in (Lyle)
    Re: Help!  Multiple line extract from file based on use (Tad McClellan)
    Re: Help!  Multiple line extract from file based on use <bcaligari@fireforged.com>
    Re: How can I get rid of ISO codes? <gnarinn@hotmail.com>
        IGNORE PREVIOUS <agm@socrates.berkeley.edu>
    Re: IGNORE PREVIOUS <jurgenex@hotmail.com>
    Re: Locating Files <gnarinn@hotmail.com>
        lwp-request warnings coming from Net::Domain <japh_klch@programmer.net>
    Re: Make-ing perl on Win98 <scheideg@mars.entic.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 16 Aug 2001 14:47:04 -0700
From: jwalker@compaq.com (Jeff Walker)
Subject: Re: ActivePerl, IIS5, Windows2000
Message-Id: <3962a9b2.0108161347.101fe327@posting.google.com>

Would have been helpful last week, but...

To add further confusion, when you apply the patch for Code_Red to an NT
box, it is nice enough to remove the Perl file associations (.pl and
 .plx)  When you try to put 'em back, you run headlong into your problem.

Aint it great?

theskunk@excite.com (Tony) wrote in message news:<74f7bcf4.0108151627.62ef1887@posting.google.com>...
> Has any one else noticed the BIG change in IIS5 and Windows2000 for
> configuring Perl?
> Instead of the Exclusions (PUT, DELETE) in the App Mappings page they
> changed the term to Verbs and they use the exact opposite values (GET,
> HEAD, POST). I don't know why they did this...
> 
> All I know is that it screwed me up for 3 hours when trying to
> configure Perl!
> 
> Anyways, hopefully this posting will help another poor soul out there.
> 
> T


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

Date: 16 Aug 2001 14:24:45 -0700
From: bpuli@hotmail.com (B Puli)
Subject: comment deletion problem
Message-Id: <42ec637b.0108161324.186cc229@posting.google.com>

hi folks:

i had discussed this problem recently under another thread, but i feel
i did not describe the problem clearly enough.

i have a problem isolating these two comments in a c file

/*********************************************************************
* <pre>
* header information
* </pre>
**********************************************************************
*
* @filename    bp.c
*
* @purpose     
*
* @component   
*
* @comments    none
*
* @create      08/15/2001
*
* @author      bp
* @end
*             
**********************************************************************/
/**************************@null{*************************************
                     Change History
 *******************************}*************************************}
 $Log: bp.c  $
 Revision 1.1.1.7 2001/07/02 14:52:29EDT bp
 Revision 1.1.1.6 2001/06/29 19:32:53EDT bp
 Revision 1.1.1.5 2001/06/28 19:13:25EDT bp
 Revision 1.1.1.4 2001/06/28 19:11:25EDT bp
 Revision 1.1.1.3 2001/06/28 19:10:01EDT bp
 Revision 1.1.1.2 2001/06/27 19:50:00EDT bp
 Revision 1.1.1.1 2001/06/14 18:17:07EDT bp
 Initial revision
**********************************************************************/

how can i separate these two comments using a regexp? or any other
way?
all the standard c-comment deletion regexps i found (in the perl docs)
and those suggested by folks on this group are combining the above two
comments into one.

any thought appreciated.

thanks

bp


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

Date: Thu, 16 Aug 2001 19:22:31 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: download.cgi, MS Ex & PDF
Message-Id: <997989751.134316427633166.gnarinn@hotmail.com>

In article <3B7BEC52.DA7203F2@pretran.co.nz>,
steve edmonds  <engineering@pretran.co.nz> wrote:


>Hi,
>I am trying to use a download perl script to force pdf's to the browser
>so as to control distribution on apache servers.

sorry, i do not understand. do you wand acrobat to open? or not?


>Works fine any which way with netscape but all woes with MS Explorer.
>I get acrobat opening but nothing hapens or I get an error with page
>(exp, not server) depending on explorer version.

what error?

i am sorry, i have no solutions but i noticed:

(snip)
>   print("Content-Disposition: atachment; filename=$file\n");

print("Content-Disposition: attachment; filename=$file\n");

 ...

>   print("Content-Description: Larry\'s File Downloader\n\n\n");

    print("Content-Description: Larry\'s File Downloader\n\n");
doesnt the extra \n get included into the pdf otherwise?    


good luck
gnari


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

Date: Thu, 16 Aug 2001 13:25:05 -0500
From: Mr Sunblade <djberge@uswest.com>
Subject: Re: Evaluation order of object methods
Message-Id: <3B7C1001.AE52923C@uswest.com>

>
>
> if(wantmethod){ # return blessed copy of self }
> elsif(defined wantarray){ # return a scalar or list }
> else{ # return self }
>

Quick clarification - this should be:

if(wantmethod){ # return blessed copy of self; original self unmodified }
elsif(defined wantarray){ # return a scalar or list; self unmodified }
else{ # return modified self }


--
"Evil will always triumph because Good is *dumb*."
-- Dark Helmet, 'Spaceballs: The Movie'





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

Date: Thu, 16 Aug 2001 18:22:35 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Evaluation order of object methods
Message-Id: <x7elqbkgpf.fsf@home.sysarch.com>

>>>>> "S" == Sunblade  <djberge@uswest.com> writes:

first off, you cc'ed me without marking the message as such. stealth
cc's are NOT COOL. 

  S> Remember, John, that I want to be able to chain together methods.

  S> my $uniq_length = $so->unique()->length();  # Fails!

  S> If I return anything other than a blessed reference the above code
  S> won't work.  That's my whole point.  I want to have my cake and eat
  S> it, too. :) I don't want to modify the original $so if an
  S> assignment is being made (which is why I was toying with the notion
  S> of an 'inline' option but was hoping to avoid it).

do you understand the problem? how can perl tell when you are chaining
vs. returning a useful value? all it knows is that you are calling it in
a scalar context (vs. void or list)

  S> I think what I really need is a fictional 'wantmethod' function
  S> which would somehow do a lookahead, checking to see what the next
  S> operation on an object is.  The code would be something like:

well, you can't have that. in fact it makes little sense since context
is propogated via runtime and can be very complex. 

  S> if(wantmethod){ # return blessed copy of self }
  S> elsif(defined wantarray){ # return a scalar or list }
  S> else{ # return self }

no. forget about it.

perl methods are nothing more than regular subroutines called with the
object/class as the first argument. so it can't tell the sub that it was
a method call and it wants to be chained. you either support chaining or
not.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org


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

Date: Thu, 16 Aug 2001 13:48:43 -0500
From: Mr Sunblade <djberge@uswest.com>
Subject: Re: Evaluation order of object methods
Message-Id: <3B7C158B.CC1709AD@uswest.com>

Uri Guttman wrote:

> >>>>> "S" == Sunblade  <djberge@uswest.com> writes:
>
> first off, you cc'ed me without marking the message as such. stealth
> cc's are NOT COOL.

Friggin' MS Outlook - GAH!  Sorry about that.  I read this newsgroup off of a
solaris box, but read my mail off of an NT box - don't ask. :(

Dan

--
"Evil will always triumph because Good is *dumb*."
-- Dark Helmet, 'Spaceballs: The Movie'





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

Date: 16 Aug 2001 21:18:39 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Evaluation order of object methods
Message-Id: <slrn9noe62.ksf.abigail@alexandra.xs4all.nl>

Mr Sunblade (djberge@uswest.com) wrote on MMCMVII September MCMXCIII in
<URL:news:3B7C0408.E08926FC@uswest.com>:
|| 
|| Remember, John, that I want to be able to chain together methods.
|| 
|| my $uniq_length = $so->unique()->length();  # Fails!
|| 
|| If I return anything other than a blessed reference the above code won't work.
|| That's my whole point.  I want to have my cake and eat it, too. :)  I don't want
|| to modify the original $so if an assignment is being made (which is why I was
|| toying with the notion of an 'inline' option but was hoping to avoid it).
|| 
|| I think what I really need is a fictional 'wantmethod' function which would
|| somehow do a lookahead, checking to see what the next operation on an object is.
|| The code would be something like:
|| 
|| if(wantmethod){ # return blessed copy of self }

A blessed copy of *self*? That doesn't make much sense for a length()
method, does it?

|| elsif(defined wantarray){ # return a scalar or list }
|| else{ # return self }
|| 
|| Is this possible?


Sort of. What you need to do is have every method return an object with
appropriate stringification and/or numerification overloading.

There's no listification overloading though. But there's @{} overloading.


Abigail
-- 
$_ = "\x3C\x3C\x45\x4F\x54";
print if s/<<EOT/<<EOT/e;
Just another Perl Hacker
EOT


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

Date: 16 Aug 2001 11:27:58 -0700
From: lcamargo@vesper.com.br (Nomade)
Subject: Exporting all files to a scalar/array
Message-Id: <39dc7e6e.0108161027.24b83e9b@posting.google.com>

Hi All,

Being fast, how do i contruct an array, or even a scalar with all
files in the current dir ??  How do i make it based in a pattern ??

In shell script i used to do : export varfiles=`ls PV??.*`

In Tcl : set logfiles [ glob imagem.*.*.log ]


Is there a build in function / way, to do it ??


Thanks in adv.

Nomade


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

Date: Thu, 16 Aug 2001 20:42:16 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Exporting all files to a scalar/array
Message-Id: <3B7C1408.3000803@post.rwth-aachen.de>

Nomade wrote:
> Hi All,
> 
> Being fast, how do i contruct an array, or even a scalar with all
> files in the current dir ??  How do i make it based in a pattern ??
> 
> In shell script i used to do : export varfiles=`ls PV??.*`
> 
> In Tcl : set logfiles [ glob imagem.*.*.log ]

And in Perl you could really chose either of the above, though the first 
of the above versions wont actually create an array.

using backticks:

my @array = split /\n/, `ls PV.*`;

using the angle-operator:

my @array = <PV.*>;

or using opendir (which will also give you the dotfiles and .|..):

opendir DIR, "." or die "Error: $!";
my @array = readdir DIR;
closedir DIR;

> Is there a build in function / way, to do it ??

Yes, opendir and readdir are in Perl's core.
Another thing you might consider is using File::Find which can also do 
recursion for you.

Tassilo


-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Thu, 16 Aug 2001 18:42:44 -0000
From: Craig Berry <cberry@cinenet.net>
Subject: Re: Exporting all files to a scalar/array
Message-Id: <Xns90FF7724A255Dcberrycinenetnet1@207.126.101.92>

lcamargo@vesper.com.br (Nomade) wrote in 
news:39dc7e6e.0108161027.24b83e9b@posting.google.com:

> Being fast, how do i contruct an array, or even a scalar with all
> files in the current dir ??  How do i make it based in a pattern ??

  perldoc -f glob

or

  perldoc -f opendir
  perldoc -f readdir

-- 
Craig Berry <http://www.cinenet.net/~cberry/>
"That which is now known, was once only imagined." - William Blake



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

Date: Thu, 16 Aug 2001 19:06:38 -0000
From: Craig Berry <cberry@cinenet.net>
Subject: Re: Exporting all files to a scalar/array
Message-Id: <Xns90FF7B322A26cberrycinenetnet1@207.126.101.92>

Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote in 
news:3B7C1408.3000803@post.rwth-aachen.de:

> my @array = split /\n/, `ls PV.*`;

No need for the split; backticks in list context automagically returns an 
array of the lines produced by the command.

  my @array = `ls PV.*`;

Note that there is a difference between the two variants; the explicit-split 
version will have no newlines on the strings in the aray, and a zero-length 
string at the end split from behind the last newline.  The list-context 
version will have newlines on the strings in the array, and no spurious last 
element.

-- 
Craig Berry <http://www.cinenet.net/~cberry/>
"That which is now known, was once only imagined." - William Blake



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

Date: 16 Aug 2001 17:06:17 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Exporting all files to a scalar/array
Message-Id: <m366bn4svq.fsf@mumonkan.sunstarsys.com>

Craig Berry <cberry@cinenet.net> writes:

> Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote in 
> news:3B7C1408.3000803@post.rwth-aachen.de:
> 
> > my @array = split /\n/, `ls PV.*`;

[...]

> the explicit-split version will have ... a zero-length string at the 
> end split from behind the last newline.

I agree the split is unnecessary, but I don't think there's a
zero-length string at the end of the resulting list.

  % perldoc -f split
  ...
  Splits a string into an array of strings, and returns it.  
  By default, empty leading fields are preserved, and empty 
  trailing ones are deleted.
  ^^^^^^^^^^^^^^^^^^^^^^^^^
  ...

-- 
Joe Schaefer          "Heavier than air flying machines are impossible."
                                               -- William Thomson (Lord Kelvin)



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

Date: Thu, 16 Aug 2001 18:17:00 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ: How can I tell whether there's a character waiting on a filehandle?
Message-Id: <w6Ue7.167$V3.171111424@news.frii.net>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.

+
  How can I tell whether there's a character waiting on a filehandle?

    The very first thing you should do is look into getting the
    Term::ReadKey extension from CPAN. As we mentioned earlier, it now even
    has limited support for non-portable (read: not open systems, closed,
    proprietary, not POSIX, not Unix, etc) systems.

    You should also check out the Frequently Asked Questions list in
    comp.unix.* for things like this: the answer is essentially the same.
    It's very system dependent. Here's one solution that works on BSD
    systems:

        sub key_ready {
            my($rin, $nfd);
            vec($rin, fileno(STDIN), 1) = 1;
            return $nfd = select($rin,undef,undef,0);
        }

    If you want to find out how many characters are waiting, there's also
    the FIONREAD ioctl call to be looked at. The *h2ph* tool that comes with
    Perl tries to convert C include files to Perl code, which can be
    "require"d. FIONREAD ends up defined as a function in the *sys/ioctl.ph*
    file:

        require 'sys/ioctl.ph';

        $size = pack("L", 0);
        ioctl(FH, FIONREAD(), $size)    or die "Couldn't call ioctl: $!\n";
        $size = unpack("L", $size);

    If *h2ph* wasn't installed or doesn't work for you, you can *grep* the
    include files by hand:

        % grep FIONREAD /usr/include/*/*
        /usr/include/asm/ioctls.h:#define FIONREAD      0x541B

    Or write a small C program using the editor of champions:

        % cat > fionread.c
        #include <sys/ioctl.h>
        main() {
            printf("%#08x\n", FIONREAD);
        }
        ^D
        % cc -o fionread fionread.c
        % ./fionread
        0x4004667f

    And then hard-code it, leaving porting as an exercise to your successor.

        $FIONREAD = 0x4004667f;         # XXX: opsys dependent

        $size = pack("L", 0);
        ioctl(FH, $FIONREAD, $size)     or die "Couldn't call ioctl: $!\n";
        $size = unpack("L", $size);

    FIONREAD requires a filehandle connected to a stream, meaning that
    sockets, pipes, and tty devices work, but *not* files.

- 

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to

    news:news.answers

or to the many thousands of other useful Usenet news groups.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-1999 Tom Christiansen and Nathan
    Torkington.  All rights reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.

                                                           05.27
-- 
    This space intentionally left blank


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

Date: 16 Aug 2001 14:10:48 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: File Locations
Message-Id: <m3hev75107.fsf@mumonkan.sunstarsys.com>

"John P" <john@trumpetweb.co.uk> jeopardizes:

> Haven't had any replies, and my posting are not showing in my browser.
> What's going on?
  ^^^^^^^^^^^^^^^

A whole lotta shakin.

-- 
Joe Schaefer     "Never put off until tomorrow that which can be done the day
                                       after tomorrow."
                                               --Mark Twain



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

Date: 16 Aug 2001 13:14:13 -0700
From: lbeckm3@hotmail.com (Lyle)
Subject: Help!  Multiple line extract from file based on user input.
Message-Id: <d3e3ca54.0108161214.481e2727@posting.google.com>

I am trying to write a perl script that will extract the given lines
from a file based on a list the user types in, i.e.

Records to print: 2,15,34-60,87

Is it possible to do this without iterating through the file multiple
times for each number or range?  I could see doing this in a sorted
array but my brain can't get past the "how do I handle the ranges"
such as the 34-60 listed above?  Also the order that the operator
selects must remain the same, i.e. if the operator puts

 ..print:  3,7,4,26

The file must be in that order in the end.  TIA!!

-Lyle
"Skipper!!, Skipper!!" -Gilligan from almost every episode of
Gilligan's Island.


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

Date: Thu, 16 Aug 2001 16:07:38 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <slrn9noa0a.635.tadmc@tadmc26.august.net>

Lyle <lbeckm3@hotmail.com> wrote:
>I am trying to write a perl script that will extract the given lines
>from a file based on a list the user types in, i.e.
>
>Records to print: 2,15,34-60,87
>
>Is it possible to do this without iterating through the file multiple
>times for each number or range?  


Yes, if the whole file will fit into memory.


>I could see doing this in a sorted
>array but my brain can't get past the "how do I handle the ranges"
>such as the 34-60 listed above?  Also the order that the operator
>selects must remain the same, i.e. if the operator puts
>
>..print:  3,7,4,26
>
>The file must be in that order in the end.  TIA!!


----------------------------------
#!/usr/bin/perl -w
use strict;

my $input = '2,15,34-60,87';
print "input '$input'\n";

my @linenums;
foreach my $term ( split /,/, $input ) {
   if ( $term =~ /^(\d+)-(\d+)$/ ) {    # a range of line numbers
      push @linenums, $1-1 .. $2-1;
   }
   else {                               # a lone line number
      push @linenums, $term-1;
   }
}

my @lines = map { "line $_\n" } 1 .. 100;  # one hundred lines

print @lines[@linenums];  # an array slice
----------------------------------


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Thu, 16 Aug 2001 23:30:47 -0000
From: "B. Caligari" <bcaligari@fireforged.com>
Subject: Re: Help!  Multiple line extract from file based on user input.
Message-Id: <9lhdn90vqa@enews1.newsguy.com>


"Lyle" <lbeckm3@hotmail.com> wrote in message
news:d3e3ca54.0108161214.481e2727@posting.google.com...
> I am trying to write a perl script that will extract the given lines
> from a file based on a list the user types in, i.e.
>
> Records to print: 2,15,34-60,87
>
> Is it possible to do this without iterating through the file multiple
> times for each number or range?  I could see doing this in a sorted

a hash is ideal

> array but my brain can't get past the "how do I handle the ranges"
> such as the 34-60 listed above?  Also the order that the operator
> selects must remain the same, i.e. if the operator puts

a list would do the job

>
> ..print:  3,7,4,26
>

a rather simplistic example, but hope it helps
(not really tested, so it could very well be a load of rubbish)


my $s = "2,15,18-22,34-40,87";

# expand num1-num2 ranges
$s =~ s/(\d+)-(\d+)/join(',', $1..$2)/eg;

# create an ordered list
my @a = split(/,/, $s);

# create a hash to store lines
my %h = map {($_ , '')} @a;

# read lines
open(MF, "<sample");
while (<MF>) {
 # is line number ($.) required?
 if (exists $h{$.}) {
  chomp;
  $h{$.} = $_;
 }
}
close(MF);

# print ordered dump of lines
foreach (@a) {
 print("$_\t$h{$_}\n");
}


B.





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

Date: Thu, 16 Aug 2001 19:10:03 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: How can I get rid of ISO codes?
Message-Id: <997989003.9108623014763.gnarinn@hotmail.com>

In article <9lf7el$n6a$1@news8.svr.pol.co.uk>,
Big Banana <bigbanana@mailandnews.com> wrote:
>I've got a Flash file, which send input to a Perl script.
>The Perl script takes this input and mails it to an address.
>BUT... I seem to have a problem whereby the data seems to contain ISO
>codes...

really? i am glad i never ran into one of those... :-)

seriously, you should describe your problem in more detail. like:

why is it a problem that data contains 'ISO codes'?
how do these 'ISO codes' look?
what do you want to do with them?
what have you tried to do?
in what way did that not work?

>Someone told me that there are some common function libraries that I can
>use...

lots, both standard and out there (www.cpan.org)

>
>I'm not sure where to start...?

me too

>
>I'd really appreciate if someone could give me a few pointers... and perhaps
>some sample code.

i dunno, maybe
   s/$isocode//g;

gnari


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

Date: Thu, 16 Aug 2001 12:01:19 -0700
From: Antonio <agm@socrates.berkeley.edu>
Subject: IGNORE PREVIOUS
Message-Id: <3B7C187F.C38F102@socrates.berkeley.edu>

I am writing a Perl script that will handle entry into a filesystem that

prompts the user for login and password.

How do I make it such that on the password prompt, the user's input is
not displayed on the screen, like in all the telnet and SSH
implementations I have ever seen?

Thanks, Antonio.



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

Date: Thu, 16 Aug 2001 12:35:24 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: IGNORE PREVIOUS
Message-Id: <3b7c207c$1@news.microsoft.com>

"Antonio" <agm@socrates.berkeley.edu> wrote in message
news:3B7C187F.C38F102@socrates.berkeley.edu...
> I am writing a Perl script that will handle entry into a filesystem that
> prompts the user for login and password.
>
> How do I make it such that on the password prompt, the user's input is
> not displayed on the screen, [...]

Please the answer to PerlFAQ8: "How do I ask the user for a password?"
It is also the first item returned by "perldoc -q password"

jue




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

Date: Thu, 16 Aug 2001 19:00:41 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Locating Files
Message-Id: <997988441.667850704863667.gnarinn@hotmail.com>

In article <hiPe7.1211$ms2.115685@news1.cableinet.net>,
John P <john@trumpetweb.co.uk> wrote:
>
>I am distributing scripts which have the line.
>use Digest::MD5 qw (md5_base64);
>
>Most of the time the scripts are fine but on some systems the users are
>getting the error message
>
>Can't locate Digest/MD5.pm in @INC (@INC contains:
>/usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0
>/usr/local/lib/perl5/site_perl/5.6.0/i686-linux
>/usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .)
>
>I thought that this was a standard module. found in a standard location.
>Does anyone have any ideas please. I have asked them to check their Shebang
>lines are correct but they still get the error. I have some rather irrate
>customers!
>

your customers need to download and install Digest::MD5 as it is not
on their system. this is a simple procedure. i suggest they use
the cpan utility.

gnari



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

Date: Fri, 17 Aug 2001 02:19:46 +0800
From: "kenneth" <japh_klch@programmer.net>
Subject: lwp-request warnings coming from Net::Domain
Message-Id: <9lh2kr$r3k4@imsp212.netvigator.com>

When I run:

D:\temp>lwp-request
The system cannot find the path specified.
Use of uninitialized value in scalar assignment at
D:/Perl/site/lib/Net/Domain.pm line 202.
Use of uninitialized value in scalar assignment at
D:/Perl/site/lib/Net/Domain.pm line 202.
Use of uninitialized value in pattern match (m//) at
D:/Perl/site/lib/Net/Domain.pm line 226.
Use of uninitialized value in split at D:/Perl/site/lib/Net/Domain.pm line
233.
 ...

Why this still haven't been fixed in the latest version? I've already
updated to libwww-5.53 and libnet-1.0703. I see that in Net::Domain it tries
to run "domainname" to get the domain name, but this Unix command is not
available on Windows.

Any idea?

Kenneth





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

Date: 16 Aug 2001 20:54:46 GMT
From: Kent Scheidegger <scheideg@mars.entic.net>
Subject: Re: Make-ing perl on Win98
Message-Id: <3b7c3316$0$18733@wodc7nh0.news.uu.net>

The question was how to get "make" to work without depending on 
an external binary.  If anyone knows, I would appreciate it.

Wyzelli <wyzelli@yahoo.com> wrote:

> "Kent Scheidegger" <scheideg@mars.entic.net> wrote in message
> news:3b79ccf9$0$148@wodc7nh6.news.uu.net...
>>   On cpan.org, it blithely states that Windoze compatibility
>> is now built in, so you don't need to go get the binary "ports"
>> any more.  Just "make" your own.  My experience is somewhat
>> different.
>>
>>   I got the Borland C++ 5.5 compiler.  I got dmake.  I followed
>> the README.WIN32 directions carefully.  It was a total failure.
>> No perl.exe was compiled.  A bunch of stuff flew by on the screen,
>> but nothing intelligible to tell me what the problem is.
>>
>>   The README.WIN32 file has some disparaging remarks about Win98's
>> command.com shell.  Is that the problem?  Is the "make" process
>> just for NT and incompatible with 98?  Or is there some simple
>> trick I am missing here to actually do this on Win98?
>>
>>   Any info would be appreciated.

> Yep, go straight to www.activestate.com and download the binary.

> Wyzelli
> --
> ($a,$b,$w,$t)=(' bottle',' of beer',' on the wall','Take one down, pass it
> around');
> for(reverse(1..100)){$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n$_$a$s$b\n$t\n";
> $_--;$s=($_!=1)?'s':'';$c.="$_$a$s$b$w\n\n";}print"$c*hic*";


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

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


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