[22907] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5127 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 23 18:05:48 2003

Date: Mon, 23 Jun 2003 15:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 23 Jun 2003     Volume: 10 Number: 5127

Today's topics:
    Re: chomp (@filecontents = <HANDLE>); slows down <mikeflan@earthlink.net>
    Re: chomp (@filecontents = <HANDLE>); slows down <mikeflan@earthlink.net>
    Re: chomp (@filecontents = <HANDLE>); slows down <mikeflan@earthlink.net>
    Re: chomp (@filecontents = <HANDLE>); slows down <mikeflan@earthlink.net>
    Re: chomp (@filecontents = <HANDLE>); slows down <tassilo.parseval@rwth-aachen.de>
    Re: chomp (@filecontents = <HANDLE>); slows down <uri@stemsystems.com>
    Re: chomp (@filecontents = <HANDLE>); slows down <uri@stemsystems.com>
    Re: chomp (@filecontents = <HANDLE>); slows down (Tad McClellan)
    Re: emacs or vim Which editor ?? <ddunham@redwood.taos.com>
        Finding cycles and Graph::Base <goedicke@goedsole.com>
        framework for a web application? <johanoberm@gmx.de>
    Re: perl 5.8.0 install problems on Solaris 2.8 <daniel.rawson.take!this!out!@asml.nl>
    Re: problem with Tk800.023.tar.gz from CPAN (Randy Kobes)
    Re: Reading just the right amount into file...(Works ju <no-email@aol.com>
    Re: Reading just the right amount into file... <no-email@aol.com>
        Resource for Perl Newbies <anthony@nospam.safferconsulting.com>
    Re: Resource for Perl Newbies <bigj@kamelfreund.de>
    Re: stopping PPM3 connecting to internet for LOCAL inst (Randy Kobes)
    Re: unicode in Image::Magick (hex values and braces pro <bert@rekalldesign.com>
    Re: uninitialized value errors when using WSDL::Generat <katz@underlevel.net>
        using SOAP::Lite to call other services. <katz@underlevel.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 23 Jun 2003 18:35:15 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <3EF748DE.DF1EC72F@earthlink.net>


Thomas Wasell wrote:

>
> I _hope_ your code starts with something like:
>
>     #!perl
>     use strict;
>     use warnings;
>     use diagnostics;
>

I'm trying to get to there, but haven't yet.  From now on I'll start
with that every time.  I was running outside a command box, so
those statements weren't working for me anyway when I started.


> >#Open and read filelist.txt if it exists
> >open (LIST, "<filelist.txt") or print "filelist.txt does not exist",
> >system('pause');
>
> There are a few problems here:
>
>   1) system('pause') will executed BEFORE the print statement.
>
>   2) open can fail for other reasons than 'filelist.txt' not
>      existing. You should ALWAYS include '$!' in you error
>      message.
>
>   3) If there is a problem, your program won't terminate, but
>      keep going with an unopened file handle.
>
>   4) The result of system('pause') (probably 0) will be printed.
>
> You can try this:
>
>     unless ( open LIST, "<filelist.txt" ) {
>       print "Can't open 'filelist.txt': $!\n";
>       system('pause');
>       exit;
>     }
>

Thanks.  I like that and have it at all 3 open locations.


>
> >    #Grab main file contents**************THIS IS THE SLOW PART!!!!!!!!!!!!!
> >    chomp (@filecontents = <HANDLE>);
>
> Exactly! This reads the entire file into memory, and if the file is large,
> it'll be _very_ slow. I'm not sure what you're trying to do, but it appears
> to be:
>
>     IF any line in the file is exactly "something"
>        AND the one four lines later is exactly "somethingelse"
>        AND the ten lines after that is not empty
>     THEN print some stuff
>
> You need to do this without keeping the entire file in memory. Tassilo v.
> Parseval and John W. Krahn gave you a suggestion how this can be done.
> Slightly altered for "newbie readability":
>
>       my @lines;
>       for (1..15) {
>         my $new_line = <HANDLE>;
>         push @lines, $new_line;
>       }
>       chomp @lines;
>       while () {
>         if ( $lines[ 0] eq 'something'      and
>              $lines[ 4] eq 'somethingelse'  and
>              $lines[14] ne '' )
>         {
>           print OUTFILE "$listelem,$lines[2],$lines[14],\n"
>         }
>
>         if (defined(my $next_line = <HANDLE>)) {
>           chomp $next_line;
>           shift @lines;
>           push @lines, $next_line;
>         }
>         else {
>           last;
>         }
>       }
>

Yeah, but "slow" is relative.  The code I have will finish the entire
operation on the first file, which is a 400,000+ line long text file,
in under 30 seconds, which I consider to be REAL fast.  But if
this same file is 2nd or 3rd or 4th in the list in filelist.txt, then it
will take 30 minutes or sometimes longer.  This was a real
surprise to me.

This might be due to my OS (WinXP), or maybe not.  I need
to get a Linux box going to further test some of these things,
but that is going to take quite a while.

I also plan to test the partial file processing scheme that has
been proposed, but that is going to take a while also.  Maybe
on my upcoming vacation . . .  But I really like the "suck the
whole file" method if it will work fast.  I'm going to have other
"if" test and output lines for other text patterns in the future -
other than the single "if" I have now.

I'm still messing around with the filelist.txt method, but to tell
the truth, I'm focusing more on just running one pl file at a
time for each text file processed, and just running hundreds
of pl files if necessary.  That seems to solve the "SLOW"
problem I've described here.

I hope to figure all this stuff out someday, but it will certainly
take a while.

Thanks a bunch for all your help.  I'll start another thread in a
couple weeks if I have more questions, or info to report to
the list.



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

Date: Mon, 23 Jun 2003 18:40:25 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <3EF74A15.35A01F15@earthlink.net>


Bart Lateur wrote:

> Mike Flannigan wrote:
>
> >I need to learn how to do this.  It was in
> >this book I've read "Learn Perl in a Weekend".
>
> Jeezes. There now are 21 days in a weekend? Or do they really expect
> people to learn Perl in all of 2 days off work?
>

Pretty funny, heh?  When I saw that book in the library early this
month, I had only heard of Perl 3 days before that on the web.
I got into Perl just to do the kind of stuff my program does, and
it sure works pretty good.  Now I have the 21 day book on
order through the library.  After that, maybe "Learn Perl in only
one year" is next  :-)


Mike





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

Date: Mon, 23 Jun 2003 18:49:30 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <3EF74C36.26E83DDA@earthlink.net>


Helgi Briem wrote:

> Go to your Start Menu.  On most Windows machines that
> will be in the bottom left hand corner. Somewhere in your
> menu structure is a 'Command Prompt' item.  Either use that
> or,  Open the 'Run' menu, type in 'cmd' and Enter.
>
> You should get a black window box with a command prompt
> in it that looks something like:
>
> C:\>
>
> Type a command there.  To test perl, type something like:
>
> C:\>perl -e "print 'Hello world';"
>

Thanks.  I didn't realize you guys were talking about a simple
DOS command window (until yesterday that is).  I was going
to C:\perl\bin  and typing "perl" and trying to use that window.
I still suspect that might work, but I've given up on that and I
am running in the DOS window now.




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

Date: Mon, 23 Jun 2003 19:00:43 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <3EF74ED7.E1D4DDC5@earthlink.net>


Helgi Briem wrote:

> Why are you looking at the installation instructions?
>
> Look at file:///C:/Perl/html/index.html
>
> >What I'm really looking for is a command syntax help system.
> >From what I've seen perldoc doesn't give that either, does it?
>
> Of course it does.  The best one available for any
> programming language in the world.

Right you are.  I screwed up again.  I've got it now.  I really
need to read that perlsyn section.  It apparently has a lot of
the simple command syntax things I'm looking for.

Another simple question.  What do they call all that
/^#\s*line\s+(\d+)\s*(?:\s"([^"]+)")?\s*$/
stuff I see?  I want to learn that.  I found this section below,
but it doesn't seem to explain their use.  Are they called
preprocessors, line directives, or what?

__________________________

Plain Old Comments (Not!)

Much like the C preprocessor, Perl can process line directives. Using
this, one can
control Perl's idea of filenames and line numbers in error or warning
messages
(especially for strings that are processed with eval()). The syntax for
this
mechanism is the same as for most C preprocessors: it matches the
regular
expression /^#\s*line\s+(\d+)\s*(?:\s"([^"]+)")?\s*$/ with $1
being the line number for the next line, and $2 being the optional
filename
(specified within quotes).

There is a fairly obvious gotcha included with the line directive:
Debuggers and
profilers will only show the last source line to appear at a particular
line number
in a given file. Care should be taken not to cause line number
collisions in code
you'd like to debug later.


snip



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

Date: 23 Jun 2003 19:18:26 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <bd7jq2$1nd$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Mike Flannigan:

> Another simple question.  What do they call all that
> /^#\s*line\s+(\d+)\s*(?:\s"([^"]+)")?\s*$/
> stuff I see?  I want to learn that.  I found this section below,
> but it doesn't seem to explain their use.  Are they called
> preprocessors, line directives, or what?

No, those are regular expressions. See 

    perldoc perlretut
    perldoc perlre

The first one is a tutorial after which you should know what they are
about. The second is the reference that also covers the more esoteric
aspects. Finally, the regular expression operators are also mentioned in
perlop.pod (accessible via 'perldoc perlop'), under "Regexp Quote-Like
Operators".

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Mon, 23 Jun 2003 20:34:59 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <x7llvspm6l.fsf@mail.sysarch.com>

>>>>> "MF" == Mike Flannigan <mikeflan@earthlink.net> writes:


  MF> Thomas Wasell wrote:
  >> 
  >> I _hope_ your code starts with something like:
  >> 
  >> #!perl
  >> use strict;
  >> use warnings;
  >> use diagnostics;
  >> 

  MF> I'm trying to get to there, but haven't yet.  From now on I'll start
  MF> with that every time.  I was running outside a command box, so
  MF> those statements weren't working for me anyway when I started.

don't use diagnostics on production code. it is very large and slow to
load. you can always get the same output by using the splain utility
that comes with perl. perldoc splain will tell you more.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 23 Jun 2003 20:37:52 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <x7isqwpm1r.fsf@mail.sysarch.com>

>>>>> "MF" == Mike Flannigan <mikeflan@earthlink.net> writes:

  MF> Right you are.  I screwed up again.  I've got it now.  I really
  MF> need to read that perlsyn section.  It apparently has a lot of
  MF> the simple command syntax things I'm looking for.

perlsyn has all of the perl syntax, not just a lot of things. as people
have been telling you, perl has the best docs of any lang out
there. over 1000+ pages. you have to read and reread them all the time,
especially when beginning. read perlsyn, perlop, perlfunc ALL the way
through even if you don't understand stuff. and read the entire perl FAQ
as well (also skip stuff if you don't understand it). you will learn
more this way than by posting more in this thread.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 23 Jun 2003 16:05:38 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: chomp (@filecontents = <HANDLE>); slows down
Message-Id: <slrnbfeqt2.1tf.tadmc@magna.augustmail.com>

Mike Flannigan <mikeflan@earthlink.net> wrote:
> Bart Lateur wrote:
>> Mike Flannigan wrote:

>> >this book I've read "Learn Perl in a Weekend".


> Now I have the 21 day book on
> order through the library.  


You are expected to _learn_ from your experiences...


> After that, maybe "Learn Perl in only
> one year" is next  :-)


 ... so why are you still throwing money away on "formula titles"?


Get a *good* Perl book, or don't spend the money at all.


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


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

Date: Mon, 23 Jun 2003 20:23:54 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: emacs or vim Which editor ??
Message-Id: <ulJJa.920$Fp5.133329974@newssvr13.news.prodigy.com>

nomads <nomads@covad.net> wrote:
> I am trying to find a editor for windows xp, emacs needs to be compiled for
> XP  (is that correct ?)

Probably not.  I don't have/use XP, but I use emacs and cperl mode on
other versions of windows all the time.

If you use cygwin, you can get a "cygwin-aware" version from the usual
places.  If you want a more "native" version, try
http://ftp.gnu.org/gnu/windows/emacs/latest/.  You probably will want
the *-bin-* copy.

-- 
Darren Dunham                                           ddunham@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


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

Date: Mon, 23 Jun 2003 18:24:59 GMT
From: William Goedicke <goedicke@goedsole.com>
Subject: Finding cycles and Graph::Base
Message-Id: <m3brwobqjb.fsf@mail.goedsole.com>

Dear Y'all - 

Has anybody come up with a way of finding cycles in graphs created
with Graph::Base?

-- 

     Yours -      Billy

============================================================
     William Goedicke     goedicke@goedsole.com            
                          http://www.goedsole.com:8080      
============================================================

          Lest we forget:

Q: How can I become a programmer?
A: Well, uh, write programs.

		- Kevin Montuori


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

Date: Mon, 23 Jun 2003 22:24:08 +0200
From: Johannes Obermann <johanoberm@gmx.de>
Subject: framework for a web application?
Message-Id: <sdoefvod2ss2kf1p9q5gq5eudos93jnlfp@4ax.com>

Hello,

I'm searching for a "best practice" framework to build 
a mid-size web application.

It's a bit tricky because the requirements say not to
use the apache mod_perl module. The application has
to run via "normal" CGI (that's what most providers
are offer)

Here are the other basic requirements of the searched
framwork/modules:
- Support of Model View Controller Conecpt (MVC)
- Support of HTML Templates
- Support of user Authorization and Authentication
- Support of Sessions

I think a lot of people have experience in this
area and I like to know what they recommend.

Thinks like Mason are not what I'm searching for
because they are mod_perl based (ok, they can run
without it but they are really proved with mod_perl)

Is it best pratice so use the different framworks like
HTML::Template, CGI:Session, CGI and so on; or is there
another integrated framework that brings this all together?

Thanks and greetings
Jo


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

Date: Mon, 23 Jun 2003 15:20:20 -0400
From: Dan Rawson <daniel.rawson.take!this!out!@asml.nl>
Subject: Re: perl 5.8.0 install problems on Solaris 2.8
Message-Id: <bd7jtl$pac30$1@ID-122008.news.dfncis.de>

Brian Abernathy wrote:
> I am trying to build perl 5.8.0 on Solaris 2.8 using gcc.  gcc info below...
> gcc -v
> Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2.3/specs
> Configured with:
> ../configure --disable-nls --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/
> ld
> Thread model: posix
> gcc version 3.2.3
> 
> 
> I am using the following command to configure perl:
> sh Configure -de -Dcc=gcc -Dusethreads -Duselargefiles
> 
> 
> Below is the partial output from the perl configure script:
> <snip>
> Checking for optional libraries...
> No -lsfio.
> Found -lsocket (shared).
> No -lbind.
> No -linet.
> Found -lnsl (shared).
> No -lnm.
> No -lndbm.
> Found -lgdbm (shared).
> No -ldbm.
> Found -ldb.
> Found -ldl (shared).
> No -ldld.
> No -lsun.
> Found -lm (shared).
> Found -lrt (shared).
> Found -lpthread (shared).
> Found -lc (shared).
> No -lcposix.
> No -lposix.
> No -lndir.
> No -ldir.
> No -lbsd.
> No -lBSD.
> No -lPW.
> No -lx.
> No -lutil.
> </snip>
> <snip>
> I used the command:
> 
>         gcc -o try -O -D_REENTRANT -fno-strict-aliasing -L/usr/local/lib
> try.c -lsocket -lnsl -lgdbm -ldb -ldl -lm -lrt -lpthread -lc
>          ./try
> 
> and I got the following output:
> 
> Segmentation Fault
> The program compiled OK, but exited with status 139.
> (The supplied flags or libraries might be incorrect.)
> You have a problem.  Shall I abort Configure [y]
> Ok.  Stopping Configure.
> </snip>
> 
> 
> Any ideas/advice on what may be causing the problem(s)?
> 
> 
> 
> 
> 
Brian -

I'm having EXACTLY the same problem, only using gcc 3.0.2  I posted to gnu.gcc.help with no response.  Doesn't seem to 
be affected by the Configure command-line options, either (threads or not, etc.).

Dan



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

Date: 23 Jun 2003 21:59:19 GMT
From: randy@theoryx5.uwinnipeg.ca (Randy Kobes)
Subject: Re: problem with Tk800.023.tar.gz from CPAN
Message-Id: <slrnbfet4k.bk2.randy@theoryx5.uwinnipeg.ca>

On Mon, 23 Jun 2003 10:14:31 -0400, Heng Xu <xuheng@iastate.edu> wrote:
>I just encountered a little problem with the installation of 
>the Tk module from CPAN. After "perl Makefile.PL", I typed "make".
>Then there came a msg saying that 
>
>Writing Makefile for Tk
>Makefile:95: *** missing separator.  Stop.
>  /usr/bin/make  -- NOT OK

This type of message often means that the 'make' program
invoked isn't the same as what Perl's Config.pm thinks it is.
Does 'perl -V:make' report an equivalent to /usr/bin/make?

-- 
best regards,
randy kobes


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

Date: Mon, 23 Jun 2003 13:32:03 -0500
From: "J. Smith" <no-email@aol.com>
Subject: Re: Reading just the right amount into file...(Works just fine!!)
Message-Id: <vfeht2ik2vhoe4@corp.supernews.com>

Oops!
Sorry. Works just fine.
tYpE-o on my end.

Thank you very much!!

"bd" <bdonlan@bd-home-comp.no-ip.org> wrote in message
news:pan.2003.06.23.17.54.40.87645@bd-home-comp.no-ip.org...
> On Mon, 23 Jun 2003 12:38:49 -0500, J. Smith wrote:
>
> > Hello perl people.
> >
> > I've been racking my brain over this for about three days now.
> > I finally decided to ask for help.
> >
> > I have one big binary file.
> > In this file I've "glued" the data from multiple files.
> > I have a record for each file on where to seek, and how much to read to
> > "extract" that particular file.
> >
> > Example:
> > seek(BINARY, $pos,  0);
> > read(BINARY, $data, $bytes);
> > ...
> >
> > My problem is that if any particular file is fairly large, it really
eats up
> > the memory.
> > I'm looking for a way to get to the file position that I need, then
read,
> > maybe 5000 bytes at a time until I reach $bytes.
> >
> > I've tried many ways, and I've ended up with many different results, but
not
> > the expexted result.
>
> seek(BINARY, $pos, SEEK_SET) or die "$!\n";
> while($bytes){
>   my $len = ($bytes > 5000) ? 5000 : $bytes;
>   $bytes -= $len;
>   read(BINARY, $data, $len) or die "$!\n";
>   &dosomething($data);
> }
> --
> Freenet distribution not available
> Disc space -- the final frontier!
>




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

Date: Mon, 23 Jun 2003 13:25:54 -0500
From: "J. Smith" <no-email@aol.com>
Subject: Re: Reading just the right amount into file...
Message-Id: <vfehhhi7h7ki4d@corp.supernews.com>

That doesn't seem to work.
It doesn't seem to read and data.

"bd" <bdonlan@bd-home-comp.no-ip.org> wrote in message
news:pan.2003.06.23.17.54.40.87645@bd-home-comp.no-ip.org...
> On Mon, 23 Jun 2003 12:38:49 -0500, J. Smith wrote:
>
> > Hello perl people.
> >
> > I've been racking my brain over this for about three days now.
> > I finally decided to ask for help.
> >
> > I have one big binary file.
> > In this file I've "glued" the data from multiple files.
> > I have a record for each file on where to seek, and how much to read to
> > "extract" that particular file.
> >
> > Example:
> > seek(BINARY, $pos,  0);
> > read(BINARY, $data, $bytes);
> > ...
> >
> > My problem is that if any particular file is fairly large, it really
eats up
> > the memory.
> > I'm looking for a way to get to the file position that I need, then
read,
> > maybe 5000 bytes at a time until I reach $bytes.
> >
> > I've tried many ways, and I've ended up with many different results, but
not
> > the expexted result.
>
> seek(BINARY, $pos, SEEK_SET) or die "$!\n";
> while($bytes){
>   my $len = ($bytes > 5000) ? 5000 : $bytes;
>   $bytes -= $len;
>   read(BINARY, $data, $len) or die "$!\n";
>   &dosomething($data);
> }
> --
> Freenet distribution not available
> Disc space -- the final frontier!
>




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

Date: Mon, 23 Jun 2003 15:40:21 -0500
From: "Anthony M. Saffer" <anthony@nospam.safferconsulting.com>
Subject: Resource for Perl Newbies
Message-Id: <3ef76585_1@nntp2.nac.net>

I just posted the complete hyperlinked "Teach yourself Perl in 21 days" at
my website. You can view it at
http://www.safferconsulting.com/perl-tut

Anthony

--
Professional Software and Web Application Development
www.safferconsulting.com




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

Date: Mon, 23 Jun 2003 20:13:00 +0200
From: "Janek Schleicher" <bigj@kamelfreund.de>
Subject: Re: Resource for Perl Newbies
Message-Id: <pan.2003.06.23.18.12.58.739847@kamelfreund.de>

Anthony M. Saffer wrote at Mon, 23 Jun 2003 15:40:21 -0500:

> I just posted the complete hyperlinked "Teach yourself Perl in 21 days" at
> my website. You can view it at
> http://www.safferconsulting.com/perl-tut

It seems like Chapter 0 is missing:

Chapter 0
---------

use strict;
use warnings;


(A lot of the used Notes and Warnings in the book could have simply
replaced by them :-))



Greetings,
Janek


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

Date: 23 Jun 2003 22:04:05 GMT
From: randy@theoryx5.uwinnipeg.ca (Randy Kobes)
Subject: Re: stopping PPM3 connecting to internet for LOCAL installs
Message-Id: <slrnbfetdh.bk2.randy@theoryx5.uwinnipeg.ca>

On Mon, 23 Jun 2003 13:28:49 +0100, Chris Lowth <dont@want.spam> wrote:
>I want to use "PPM" in ActiveState perl 5.8.0 on NT4 to install a module 
>from a local file. I have downloaded the zip file and unzipped it. Then run
>        ppm install IO-Stringy.ppd
>This hangs.
>Running "tcpdump" on the firewall, I can see that the command is trying to 
>connect to ppm.activestate.com (which my firewall forbids - I am trying to 
>simulate a truely off-line install).

Are you running the ppm command from the same directory as
where the ppd file is located? 

-- 
best regards,
randy kobes


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

Date: 23 Jun 2003 21:28:16 GMT
From: Bert Balcaen <bert@rekalldesign.com>
Subject: Re: unicode in Image::Magick (hex values and braces problem?)
Message-Id: <Xns93A3EEC1B2574rmzrmzrmz@195.238.3.177>

> I'd suggest that you are confusing a programming source code notation
> with a run-time representation.

yes, this was indeed the problem!

> Or if you've got the numeric value of the character in a scalar
> say $value, then you simply use chr($value) - Perl will work out for
> itself if that's big enough to need its Unicode semantics, as far as I
> understand it.
> 

yup, i am creating $text like this:

my $text="";
for(my $uni=25000;$uni<25100;$uni++) {
	$text .= chr(hex($uni));
	$uni ++;
}

and this works like a breeze!

clarifying the braces was also really helpful - i was totally lost on that 
one ...


thanks a lot Alan!
you help was invaluable!

greetings,
bert




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

Date: Mon, 23 Jun 2003 16:31:09 -0500
From: Yarden Katz <katz@underlevel.net>
Subject: Re: uninitialized value errors when using WSDL::Generator
Message-Id: <86vfuwpjky.fsf@underlevel.net>

tadmc@augustmail.com (Tad McClellan) writes:

> Yarden Katz <katz@underlevel.net> wrote:
>
>> {
>> 	local $/ = undef;
>> 	open  WSDL, 'WSDLTest.wsdl';
>
>
> You should always, yes *always*, check the return value from open():
>
>    open WSDL, 'WSDLTest.wsdl' or die "could not open 'WSDLTest.wsdl'  $!";
>
>
>> 	$result_ref = <WSDL>;
>
>
>> readline() on closed filehandle WSDL at hello-client.pl line 21.
>
>
> Looks like your open() failed without you knowing that it failed...

Thanks a lot--you were absolutely correct.  I forgot for a minute that
this script was not tested on my machine, so I lacked proper
permissions to write that file.

Thanks again,
-- 
Yarden Katz <katz@underlevel.net>  |  Mind the gap


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

Date: Mon, 23 Jun 2003 16:50:36 -0500
From: Yarden Katz <katz@underlevel.net>
Subject: using SOAP::Lite to call other services.
Message-Id: <86k7bcpioj.fsf@underlevel.net>

Hi,

  I'm using SOAP::Lite to write a few services.  I managed to get a
  few clients/server running correctly.

  I'm having trouble getting SOAP::Lite to call external, non-Perl
  services, however.  The service I am interested in is
  'ValidateEmail' (see
  http://www.webservicex.net/ValidateEmail.asmx).

  According to the SOAP::Lite documentation, it is perfectly valid to
  do:

          print "RESULT: ", SOAP::Lite
            -> uri('http://www.webserviceX.NET')
            -> proxy('http://www.webservicex.net/ValidateEmail.asmx')
            -> service('http://www.webservicex.net/ValidateEmail.asmx?WSDL')
            -> IsValidEMail($email) . "\n";

  When I do this, the response I get from the server is:

  "RESULT:  "

  In other words, nothing is returned.  

  As you can tell, this is incorrect: the service is supposed to
  return a boolean value (true or false) enclosed in a
  IsValidEmailResult tag.  Precisely, a sample response (from the
  service's documentation) should look like this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsValidEMailResponse xmlns="http://www.webserviceX.NET">
      <IsValidEMailResult>boolean</IsValidEMailResult>
    </IsValidEMailResponse>
  </soap:Body>
</soap:Envelope>

  Any ideas on what could be causing my errorneous response?  I'm
  unable to find information from the SOAP::Lite debug info that
  indicates a problem.

  It might also be important to note that the code that's actually
  calling this webserviceX.net service is a service too (this is the
  service that I'm writing), called 'ValidateEmailAddresses'.  The
  output of that service is:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:ValidateEmailAddressesResponse
xmlns:namesp1="urn:ValidateEmails">
<s-gensym5 xsi:type="xsd:string"/>
</namesp1:ValidateEmailAddressesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  
  Which seems to make sense, since the service I was attempting to
  call from webserviceX.net did not return any output.

Thanks a lot,
-- 
Yarden Katz <katz@underlevel.net>  |  Mind the gap


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

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


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