Removing multiple spaces

2005-05-17 Thread Dale
$str =~ s// /i; $str =~ s/ / /i; $str =~ s/ / /i; Is there an easier way to do this as I could end up with 48 of these from 2 spaces to 50 spaces? Cheers! -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <ht

Re: Removing multiple spaces

2005-05-17 Thread Dale
multiple, separate, items and not look at multiple items in one block, which was why I didn't try it. Such as "dog cat dog" to "pup cat pup". Now I know better! ;) Cheers! -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Removing multiple spaces

2005-05-17 Thread Dale
, especially the part about quantifiers. Thanks for the pointer! I'll run through the doc so I can understand how to build these sorts of statements! Cheers! -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org

Re: Removing multiple spaces

2005-05-18 Thread Dale
doesn't work. Neither does : if($line eq [\s\d]) ...to try and find if it's just contain numbers and spaces. Obviously I'm missing the point on the syntax but just can't see what and the perldocs read like stereo instructions! :) -- Dale -- To unsubscribe, e-mail: [EM

Re: Removing multiple spaces

2005-05-18 Thread Dale
Hi Jeff 'japhy' Pinyan, you wrote: On May 18, Dale said: Hi John W. Krahn, you wrote: If I understand you correctly then this will do what you want: $str =~ tr/ //s; Or if you want a slower method: $str =~ s/ +/ /g; This might sound a strange question, but why is the first one faster?

Re: Removing multiple spaces

2005-05-19 Thread Dale
Hi Jeff 'japhy' Pinyan, you wrote: if ($line =~ /^[\s\d]+$/) { ... } Can I just check something here Jeff. I thought the ^ symbol was for "not equal", so why does this work when I'm looking for digits? Cheers! -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: remove duplicate lines

2005-05-28 Thread Dale
go over my head (and I'm no stranger to programming). I'm just grateful for the help I've already been given. -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Best practice when using data from external files

2005-06-12 Thread Dale
could take quite a while to read. In addition, locking the file could delay others from using the script. If I have individual data files for each Agent then this would speed up usage, but then the script would become more complex. What would the best practice be in this case? Cheers! -- Da

Re: Best practice when using data from external files

2005-06-13 Thread Dale
won't ever (not through choice) have any form of SQL so I'll just have to struggle with the files. :) Cheers! -- Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Best practice when using data from external files

2005-06-13 Thread Dale
Hi Chris Devers, you wrote: On Mon, 13 Jun 2005, Dale wrote: However, the server this currently sits on doesn't and won't ever (not through choice) have any form of SQL so I'll just have to struggle with the files. :) You miss the point of SQLite then. You're right, I

Re: Best practice when using data from external files

2005-06-14 Thread Dale
Hi Chris Devers, you wrote : On Tue, 14 Jun 2005, Dale wrote: Hi Chris Devers, you wrote: >You miss the point of SQLite then. You're right, I have. I assumed it would need SQL to work. Thanks for correcting me! :) You're still confused, I think, though it's not quite

Re: Best practice when using data from external files

2005-06-17 Thread Dale
Hi Wiggins d'Anconia, you wrote : Dale wrote: [snip] I think a bit of background is needed. I work for the helpdesk of an ISP. The space I've got is a staff account which mirrors the service the residential customers receive. It's got a cgi-bin (of course, otherwise there

Outputting content to the web

2001-05-01 Thread Dale Owens
rm processor is useless. Is this a problem with the web host or am I missing something in the way I am trying to output content to the web page? Dale

Re: Outputting content to the web

2001-05-01 Thread Dale Owens
mailing lists and subscribed to countless newsgroups. Not one has ever been this responsive. On top of that, none of the replies made me feel like an idiot for asking my question. Thanks, Dale - Original Message - From: Timothy Kimball <[EMAIL PROTECTED]> To: <[EMAIL PROTE

Re: regexp trouble

2001-05-07 Thread Dale Owens
By adding the \W as in $temp =~ s/^[a-z0-9\W]+_//i; You can also strip any punctuation such as ' and " from the string. - Original Message - From: Brett W McCoy <[EMAIL PROTECTED]> To: Johan Groth <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001

Sorting a Hash

2001-11-28 Thread Pellerin, Dale
ues and print the table my($announcement,$description) = split /~/,$item; print ""; print ""; print "$description( $key)"; print ""; I would appreciate any assistance in figuring out how to sort by year, then by month. Thank you. Dale

Newbie - #include virtual in my .SHTML file just displays the contents of the CGI

2001-12-31 Thread Dale W
If I run the script from my browser, it works great. When I call the CGI file from my SHTML file, it just dumps all of the text from the CGI file into the brower. Here is a simple example: -MY.SHTML -MY.CGI #!/usr/bin/perl print "content-type:text/html\n\n"; print "This is BOLD"; pr

Re: how would you write a spell checker?

2005-03-20 Thread Dale Hagglund
l check is on standard input. However, even as it stands (modulo any syntax errors) it should be functional as a simple spell checker. Dale Hagglund. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

reading and writing file names

2008-01-07 Thread Dale Mosby
on? Stated another way, how much divergence between two systems is tolerated with a serialized data structure? - Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: reading and writing file names - thanks

2008-01-07 Thread Dale Mosby
always saying that PERL just does the right thing... I guess it does. - Dale -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/