Re: techniques for handling large text files

2003-12-29 Thread Andy Unick
How's abouts this (pls excuse any syntax errs) . my $out1 = "$file1.txt"; my $out2 = "$file2.txt"; open(INPUT, $filename) or die "error: $filename cannot be opened\n"; open(OUT1, ">$out1") or die "error: $out1 cannot be opened for writing\n"; open(OUT2, ">$out2") or die "error: $out2 cannot b

GraphViz::Data::Structure on Win32

2003-12-29 Thread mcdavis941
Hi list, Does anyone have experience using GraphViz::Data::Structure (http://search.cpan.org/~mcmahon/GraphViz-Data-Structure-0.07/lib/GraphViz/Data/Structure.pm) on Win32, and what was your experience?  Did you get useful results with it and how many hoops did you have to jump through?  Did y

Re: techniques for handling large text files

2003-12-29 Thread James Edward Gray II
On Dec 29, 2003, at 12:05 AM, danl001 wrote: Hi, Howdy. If this question would be better posted to another perl list, please let me know. I think you found the right place. I have a very large text files (~2 GB) and it's in the following format: header line header line header line marker 1 he

RE: techniques for handling large text files

2003-12-29 Thread Bakken, Luke
> How's abouts this (pls excuse any syntax errs) . > > my $out1 = "$file1.txt"; > my $out2 = "$file2.txt"; > > open(INPUT, $filename) or die "error: $filename cannot be opened\n"; > open(OUT1, ">$out1") or die "error: $out1 cannot be opened > for writing\n"; > open(OUT2, ">$out2") or die "er

Re: Mail::Sender weirdness

2003-12-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > Here's wht I have: > $r .= "Sending..."; > eval { > my $senderx = new Mail::Sender {smtp => $smtp, from => $from }; You forgot to tell Mail::Sender to die in case of an error :-) > $senderx->Open({subject => $subj, to => $to }); > $senderx->SendLineEnc

RE: Mail::Sender weirdness

2003-12-29 Thread Dan Muey
> From: "Dan Muey" <[EMAIL PROTECTED]> > > Here's wht I have: > > $r .= "Sending..."; > > eval { > > my $senderx = new Mail::Sender {smtp => $smtp, from => $from }; > > You forgot to tell Mail::Sender to die in case of an error :-) Oohhh, yeah :) Thanks > > > $senderx->Open({subject =>

Weekly list FAQ posting

2003-12-29 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

RE: using SSL unable to write file

2003-12-29 Thread Dan Muey
> Hi everyone, Howdy > > I'm trying to send info with (https) SSL and my program comes > to a halt when > writing a file and sending an email. > > SSL was set up by my hosting service with an unauthenticated > certificate that > I had them set up for demo purposes. Does this have > someth

Listing Perl built in variables

2003-12-29 Thread Dan Muey
Howdy all, I was curious if there is a way to simply list all of perl's built in variables and their values. Something similar to listing the Environmental variables buy doing: for(keys %ENV) { print "$_ is $ENV{$_}\n"; } ... QUERY_STRING is foo=bar HTTP_USER_AGENT is Mozilla/5.0 (Windows; U;

Re: String::CRC32

2003-12-29 Thread anyoldcrap
Problem sorted :) I am assuming my installation of perl has been corrupted at some point - I uninstalled & re-installed, tried installing the package with ppm3 again and all was well. - Original Message - From: "Anyoldcrap" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTE

Re: Align Text

2003-12-29 Thread James Edward Gray II
On Dec 29, 2003, at 11:31 AM, Bill Jastram wrote: Bingo! James. That takes care of label issue. Good news. Glad I could help I was even able to make it three columns instead of three. And change the space between columns. Oh no, I've created a monster! You've obviously been at this for a whi

RE: Can I set '$!' ?

2003-12-29 Thread Dan Muey
> I want to be able to return a true or false value from a > function in a module and populate the $! variable with the > specific errors. Is this possible? Is there documentation on > how to do this? I can find docs on how to use $! but not how > to set it. Thanks for any help -Ken Did anyon

RE: Can I set '$!' ?

2003-12-29 Thread Daniel Staal
--As off Monday, December 29, 2003 12:54 PM -0600, Dan Muey is alleged to have said: I want to be able to return a true or false value from a function in a module and populate the $! variable with the specific errors. Is this possible? Is there documentation on how to do this? I can find docs on

RE: Can I set '$!' ?

2003-12-29 Thread Dan Muey
> --As off Monday, December 29, 2003 12:54 PM -0600, Dan Muey is > alleged to have said: > > >> I want to be able to return a true or false value from a > function in > >> a module and populate the $! variable with the specific errors. Is > >> this possible? Is there documentation on how to d

Re: Hi & a question

2003-12-29 Thread drieux
On Dec 26, 2003, at 9:37 AM, John McKown wrote: [..] E.g. export DIR1=... export DIR2=... export IPADDR=... export IPPORT=... perl-script.perl or perl-script.perl DIR1 DIR2 IPADDR IPPORT [..] Thanks for the seasonal ranting option:

Re: sleep does not work when SIGIO is handled (O_ASYNC). why?

2003-12-29 Thread drieux
On Dec 28, 2003, at 2:57 AM, Artem Koutchine wrote: [..] In order not to waste CPU time and have server do something usufull (like calculating something) i tried handling SIGIO, so, when data is available on incoming connection i handle and when there is no data, server does its own job. However, i

Re: Timeout for backtick and rsh?

2003-12-29 Thread drieux
On Dec 26, 2003, at 10:56 AM, glidden, matthew wrote: In my current script, I'm polling machines for data, mostly by using rsh and the backtick. For example: my $retVal = `rsh $hostname -l root "/usr/local/blah"`; I'd like the backticks to timeout at 30 seconds, to prevent getting stuck. I alr

Re: Can I set '$!' ?

2003-12-29 Thread Randal L. Schwartz
> "Dan" == Dan Muey <[EMAIL PROTECTED]> writes: >> I want to be able to return a true or false value from a >> function in a module and populate the $! variable with the >> specific errors. Is this possible? Is there documentation on >> how to do this? I can find docs on how to

Re: Align Text

2003-12-29 Thread Bill Jastram
Bingo! James. That takes care of label issue. I was even able to make it three columns instead of three. And change the space between columns. You've obviously been at this for a while and use the tightest code concepts I've seen. By the way, how would you 'search' the incoming file to restric

make problem with xs file (Time::Object)

2003-12-29 Thread Will Glass-Husain
Hi, I've been struggling for a few days with installing Time::Object (1.00). There's an error message associated with the xs file. My box is a standard RH Linux 9 (single processor) with the built-in Perl 5.8. (and various modules installed via CPAN). Googling turned up 1-2 people with similar

Size of dir (with recursion)

2003-12-29 Thread Jesper Noehr
Hey list. I'm having a problem reading the size of a directory with recursive directories. The problem is that du -s shows a different bytecount than my program does. Here's my code: #!/usr/gnu/bin/perl -w use File::Find; @ARGV = ('.') unless @ARGV; my $sum = 0; find sub { $sum += -s }, @ARGV;

RE: Can I set '$!' ?

2003-12-29 Thread Dan Muey
> > "Dan" == Dan Muey <[EMAIL PROTECTED]> writes: > > >> I want to be able to return a true or false value from a > >> function in a module and populate the $! variable with the > >> specific errors. Is this possible? Is there documentation on > >> how to do this? I can find d

Re: Listing Perl built in variables

2003-12-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > I was curious if there is a way to simply list all of perl's built in > variables and their values. You can list all variables in the main package: (Beware! Ugly code follows!) #!perl use Data::Dumper; $Data::Dumper::Indent = 0; $Data::Dumper::Useqq = 1; $Da

Splitting Comma delimited list

2003-12-29 Thread Colin Johnstone
Hello everyone, I use the following to split a comma delimited list and get varying results and I don't understand why. my count of the elements in the splitdata array returns 43 but the select list when displayed in our Content management system only has approximately 23 items. Some items are

RE: Listing Perl built in variables

2003-12-29 Thread Dan Muey
From: "Dan Muey" <[EMAIL PROTECTED]> > > I was curious if there is a way to simply list all of > perl's built in > > variables and their values. > > You can list all variables in the main package: > (Beware! Ugly code follows!) > > #!perl > use Data::Dumper; > $Data::Dumper::Indent = 0; > $Da

Re: Size of dir (with recursion)

2003-12-29 Thread John W. Krahn
Jesper Noehr wrote: > > Hey list. Hello, > I'm having a problem reading the size of a directory with recursive > directories. > The problem is that du -s shows a different bytecount than my program does. $ man du NAME du - estimate file space usage SYNOPSIS du [OPTION]... [FILE]

Re: Splitting Comma delimited list

2003-12-29 Thread James Edward Gray II
On Dec 29, 2003, at 3:12 PM, Colin Johnstone wrote: Hello everyone, I use the following to split a comma delimited list and get varying results and I don't understand why. Running your code on your data, I get the expected results (43). my count of the elements in the splitdata array returns 43

Re: Size of dir (with recursion)

2003-12-29 Thread Jesper Noehr
On Mon, 29 Dec 2003 13:19:29 -0800, John W. Krahn <[EMAIL PROTECTED]> wrote: Jesper Noehr wrote: Hey list. Hello, I'm having a problem reading the size of a directory with recursive directories. The problem is that du -s shows a different bytecount than my program does. $ man du NAME du

Re: Splitting Comma delimited list

2003-12-29 Thread Colin Johnstone
Hi James, Thanks for the tips, I took your advice here is the HTML returned, There still isn't the full 43 elements though strange? About You Sales Recognition Events Framework Building Wealth Compensation Employee Development Executive Development Financial Benefits Global Pulse Surv

Fwd: Splitting Comma delimited list

2003-12-29 Thread James Edward Gray II
(redirected to list by James) Begin forwarded message: From: "Stout, Joel R" <[EMAIL PROTECTED]> Date: December 29, 2003 3:37:37 PM CST To: "'James Edward Gray II'" <[EMAIL PROTECTED]> Subject: RE: Splitting Comma delimited list Not sure if this helps but there are more xml "baddies" to take care

Re: Splitting Comma delimited list

2003-12-29 Thread James Edward Gray II
On Dec 29, 2003, at 3:40 PM, Colin Johnstone wrote: Hi James, Thanks for the tips, I took your advice here is the HTML returned, There still isn't the full 43 elements though strange? So you obviously sent us: A. Different Data or B. Different Code. Right? ;) That might put us at a slight

RE: Splitting Comma delimited list

2003-12-29 Thread Tim Johnson
It looks like you are skipping exactly every other element. This is most likely a coding error in an area of the code you're not showing us or inadvertently fixed when you copied it to the email. I would check for a place where you might be shift()ing or otherwise pulling an element out and assi

Re: Size of dir (with recursion)

2003-12-29 Thread John W. Krahn
Jesper Noehr wrote: > > On Mon, 29 Dec 2003 13:19:29 -0800, John W. Krahn <[EMAIL PROTECTED]> wrote: > > > > $ ls -l test.txt > > -rw-r--r--1 john users 187 Jul 9 11:54 test.txt > > $ perl -le'print +(lstat shift)[11]' test.txt > > 4096 > > $ du -b test.txt > > 4096test.txt >

Special variables in XS/C

2003-12-29 Thread Beau E. Cox
Hi - Does anyone know where access to the perl special variables ($!, $@, $/, etc.) from c-code is documented? I can't seem to find any mention in the perl pods (guts, call, api, etc.)? Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

RE: Splitting Comma delimited list

2003-12-29 Thread Colin Johnstone
Hi All, I have nothing to gain by not showing you all my code, I have included all suggested changes and even am writing to the select list the number of elements. note the second item. here is my code again with the changes and the output below, note the items in the list this time are differ

RE: Splitting Comma delimited list

2003-12-29 Thread Bob Showalter
Colin Johnstone wrote: > Hi All, > > I have nothing to gain by not showing you all my code, I have > included all suggested changes and even am writing to the select list > the > number of > elements. note the second item. > > here is my code again with the changes and the output below, note the

RE: Splitting Comma delimited list

2003-12-29 Thread Colin Johnstone
Bob, The cms makes those changes. It also inserts comments as shown below which aren't in my code and wraps it all in the select tags. 43 BCS Employee BPFJ+ Community Program Employment Confirmations Employee Services Expense Reimbursement Flexibility Health Benefits HR Assist Ins

Re: Size of dir (with recursion)

2003-12-29 Thread Shawn
While you're at it, write a parallel version of du.pl... Modern hard drives do scatter gather, and reading lots (say 10 or so) of dirs' contents' block sizes at a time would be interesting... It would be cool if a parent kept 20 children pre-forked, and only told 10 children at a time to do their

Re: Special variables in XS/C

2003-12-29 Thread Randy W. Sims
On 12/29/2003 4:54 PM, Beau E. Cox wrote: Hi - Does anyone know where access to the perl special variables ($!, $@, $/, etc.) from c-code is documented? I can't seem to find any mention in the perl pods (guts, call, api, etc.)? Aloha => Beau; These things are not as accessible as one would wish:

Re: Special variables in XS/C

2003-12-29 Thread Beau E. Cox
On Monday 29 December 2003 01:36 pm, Randy W. Sims wrote: > On 12/29/2003 4:54 PM, Beau E. Cox wrote: > > Hi - > > > > Does anyone know where access to the perl special variables > > ($!, $@, $/, etc.) from c-code is documented? I can't seem > > to find any mention in the perl pods (guts, call, api

charting data

2003-12-29 Thread Mark Henry
Hi All, Wondering if anyone can recommend a good 3rd party tool for charting gathered data, prefereably outputting to a gif/png web page.. Thanks, ===mph _ Tired of slow downloads? Compare online deals from your local high-speed

RE: How to extract the full URL from a relative link using WWW: : Mecha nize

2003-12-29 Thread Rajesh Dorairajan
Rob, Sorry for the ambiguity in my email. Your solution worked right away. To answer your questions, @links is an array that contains the list of links in the page as www:mechanize::links objects. The argument that I used in the GET method is a hack that actually is available in LWP::UserAgent g

Re: generating GIFs

2003-12-29 Thread Armin
Robert Brown wrote: Andrew Gaffney writes: > zentara wrote: > > Well, gifs were shunned by alot of the software writers because of > > the old patent issues. So your best bet will be to make your image as > > a jpg or png, then convert it to gif afterwards. > > Is PNG a good format for a 51x

Re: Align Text

2003-12-29 Thread Bill Jastram
Thanks, that's just what I was trying to figure out, only I'd gone about it with the m// command to little or no avail. Your idea is of course much better. I'll leave you alone for awhile. You given me plenty to think about. Much appreciated! Bill J. ___

Re: Splitting Comma delimited list

2003-12-29 Thread Bob Showalter
Colin Johnstone wrote: > Bob, > > The cms makes those changes. It also inserts comments as shown below > which > aren't in my code and wraps it all in the select tags. A suggestion: Post a message with the input data, the script, and the actual output produced *by that script*. Put the input data

Re: charting data

2003-12-29 Thread Kevin Old
On Mon, 2003-12-29 at 16:39, Mark Henry wrote: > Hi All, > > Wondering if anyone can recommend a good 3rd party tool for charting > gathered data, prefereably outputting to a gif/png web page.. > Not sure about 3rd party, but the GD::Graph module does a nice job with several formats. More info

Re: Splitting Comma delimited list

2003-12-29 Thread Colin Johnstone
HI Bob, rather than persist I changed the code so that it would write each option tag to an array then I print out the array in the heredoc and it works. Be buggered if I know what the previous problem was though. Thanks all for your help #!c:/iw-home/iw-perl/bin/iwperl my $fileToOpen = shift

RE: generating GIFs

2003-12-29 Thread Tom Kinzer
sounds like a new sourceforge project is hatched...? -Original Message- From: Armin [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 2:45 PM To: [EMAIL PROTECTED] Subject: Re: generating GIFs Robert Brown wrote: > Andrew Gaffney writes: > > zentara wrote: > > > Well, gifs were

Re: Listing Perl built in variables

2003-12-29 Thread R. Joseph Newton
Jenda Krynicky wrote: > From: "Dan Muey" <[EMAIL PROTECTED]> > > I was curious if there is a way to simply list all of perl's built in > > variables and their values. > > You can list all variables in the main package: > (Beware! Ugly code follows!) The output could be a bit prettier, though, wit