CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
A way to skip down to the next line within a long string?

 



peeves5478
New User

Aug 26, 2010, 6:49 PM

Post #1 of 3 (366 views)
A way to skip down to the next line within a long string? Can't Post

Hey everyone,

I inherited a PERL script to read data from my weather station and post it onto the 'net a few years ago. The script was originally small, but over time I have added sensors and added many more algorithms to the script. I'm a PERL novice so most of what I have been able to teach myself involves loops, logical equations, etc.

Long story short...I now have one really long string of code that searches through the data in my text file. It was about 140 characters (all of my other lines are 100 or less), but with my most recent sensor it is up around 300. Now the script isn't running and I'm wondering if there is a 255 character limit for a line?

I'd rather not overhaul the entire search method at this point as I have a lot of logical code to write. Is there a character or something that I can add onto the end of the line, within the string, to continue it onto the following line? I know long lines are frowned upon in scripting, but the script is only for me so I'm not too concerned about that.

Thanks.


BillKSmith
Veteran

Aug 26, 2010, 8:05 PM

Post #2 of 3 (364 views)
Re: [peeves5478] A way to skip down to the next line within a long string? [In reply to] Can't Post

I doubt that your problem has anything to do with the length of the line. Try using the module Data::Dumper to verify whether or not the long record is read correctly.
Good Luck,
Bill


shawnhcorey
Enthusiast


Aug 27, 2010, 5:27 AM

Post #3 of 3 (360 views)
Re: [peeves5478] A way to skip down to the next line within a long string? [In reply to] Can't Post


In Reply To
Now the script isn't running and I'm wondering if there is a 255 character limit for a line?


No, in Perl, the only limit on strings is the size of your memory.

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives