RE: character string length

2000-05-25 Thread Bellenger, Bruno (Paris)

-Original Message-
From:  Peter Eisengrein [SMTP:[EMAIL PROTECTED]]
Sent:  Wednesday, May 24, 2000 18:41
To:'Bellenger, Bruno (Paris)'; '[EMAIL PROTECTED]'
Subject:   RE: character string length

Thanks. I'm pretty sure that it is a dos problem, or, more likely a
code
problem on my part. I would have liked to have written the html
table-maker
script as a .pm but I'm afraid I'm still too much of a newbie to
know how.
It would work fine as a sub{} within the script itself (probably
faster
too), but I'd like to use this with other scripts. Can you point me
in the
right direction to learn to write a module? Or am I off-track with
that too?

Thanks.

Keep posting to the list so that all can contribute help on your new
questions.
In fact, you may not need to build a module yourself to do this.
A 'require' statement might be all you need here.

Here's what Perldoc says about it :

C:\perldoc -q require
Found in C:\Perl\5.005\lib/pod/perlfaq8.pod
 What's the difference between require and use?

   Perl offers several different ways to include code from
   one file into another. Here are the deltas between the
   various inclusion constructs:

1) do $file is like eval `cat $file`, except the former:
 1.1: searches @INC and updates %INC.
 1.2: bequeaths an *unrelated* lexical scope on the eval'ed
code.

2) require $file is like do $file, except the former:
 2.1: checks for redundant loading, skipping already loaded
files.
 2.2: raises an exception on failure to find, compile, or
execute $file.

3) require Module is like require "Module.pm", except the
former:
 3.1: translates each "::" into your system's directory
separator.
 3.2: primes the parser to disambiguate class Module as an
indirect object.

4) use Module is like require Module, except the former:
 4.1: loads the module at compile time, not run-time.
 4.2: imports symbols and semantics from that package to the
current one.

   In general, you usually want `use' and a proper Perl
   module.


About building modules, see below some of this year's post about the matter.

Also have a look at 
http://world.std.com/~swmcd/steven/perl/
http://world.std.com/~swmcd/steven/perl/module_mechanics.html
http://www.pconline.com/~erc/perlmod.htm

Check 
http://www.perl.com/CPAN-local/doc/manual/html/pod/perlmodlib.html
too, and look for 'Modules: Creation, Use, and Abuse' in it.

Hope this helps !

Cheers.

_
Bruno Bellenger
Sr. Network/Systems Administrator 




+

-Original Message-
From:   Kenneth Bandes [SMTP:[EMAIL PROTECTED]]
Sent:   Sunday, January 16, 2000 17:46
To: Perl-Win32-Users Mailing List
Subject:Re: Modules

Ankit wrote:
 Does someone have a link to a good tutorial or a FAQ on Modules?Is
it easy
 to learn about modules?someone i know quit perl when he couldn't
grasp
 modules.Please send me a good link.thanks

I recommend "Tom's Object-Oriented Tutorial" by Tom Christiansen.
This
is included with your Perl distribution as perltoot.  Check out the
on-line docs from the start menu.

Ken Bandes



-Original Message-
From:   Ned Konz [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, April 07, 2000 17:29
To: Perl-Win32-Users Mailing List
Cc: Perl-Win32-Users Mailing List
Subject:Re: Creating Modules

[EMAIL PROTECTED] wrote:

 Sorry to bother everyone but can someone direct me to
documentation on how
 to create a module?  Maybe module is not the right word.  I want
to be able
 to access a set of global functions that I can store in one file
and use in
 another file.  Thanks.

try:
perldoc perlmod

and/or:
perldoc perlmodlib

-- 
Ned Konz
currently: Stanwood, WA
email: [EMAIL PROTECTED]
homepage:  http://www.bike-nomad.com



---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
 [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
 [EMAIL PROTECTED]




Re: character string length

2000-05-24 Thread Philip Newton

[Small nit pick]

David Cassell wrote:
 You wrote:

No, I didn't -- it was Peter Eisengrein.

  Anyone know what is the max length of a character string?
 
 How much RAM memory do you have?  That's the limitation you'll have
 in Perl.

RAM memory is like LCD display or USA of America, or National NASA
Administration, but OK.

The limitation is not how much RAM I have, though -- if I have 64 MB of RAM,
I think I could still allocate a 200 MB string. Virtual memory is your
friend -- the amount of virtual memory is what matters (RAM + swap on disk).

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
 [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
 [EMAIL PROTECTED]




Re: character string length

2000-05-23 Thread Cassell . David



You wrote:
 Anyone know what is the max length of a character string?

How much RAM memory do you have?  That's the limitation you'll have
in Perl.

 I am taking an array of about +/-1000 values, passing it to another script
 which converts it to an html table and passes it back to the main script.

 I get two things: in the CMD window I get an error that "The following
 character string is too long: " (but it doesn't tell me which) and then I
 get a Dr. Watson window telling me that an application error has occurred
 (for CMD.exe not perl).

It sounds like you're trying to run something big through DOS, and
DOS - not Perl - is complaining mightily.  The unmentioned "character
string" may be the entire HTML table en masse.  My advice, since you
haven't shown any code, is "don't do that".  I can't get much more
specific.  But you shouldn't be passing immense strings through MS-DOS.
Use the native abilities of Perl instead.  If you're calling another
script to do your dirty work, don't pass the info as a big string.
Save it in a file in some way and hack the script to read in the file
to get the data, then put the massaged result into another file for
your outer program to read.

David
--
David Cassell, OAO [EMAIL PROTECTED]
Senior computing specialist
mathematical statistician



---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
 [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
 [EMAIL PROTECTED]