Click here to get back home

Long line in perl script

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Long line in perl script Subra 02-22-2008
Posted by Subra on February 24, 2008, 11:39 pm
Please log in for more thread options
> John W. Krahn wrote:
> > Petr Vileta wrote:
>
> >> Subra wrote:
>
> >>> Is there any special character like in C (\) which I should put at
> >>> the end of the broken line ????
>
> >> You can wrap line at any space in your long line. Example:
>
> >> if ($settings->-> ||
> >> $settings->->) {
>
> > It doesn't even have to be at a space:
>
> > $ perl -MData::Dumper -le'$w->->-> = "hello"; print Dumper
> > $w' $VAR1 = {
> > 'x' => {
> > 'y' => {
> > 'z' => 'hello'
> > }
> > }
> > };
>
> > $ perl -MData::Dumper -le'
> > $w
> > ->
> >
> > ->
> >
> > ->
> >
> > =
> > "hello";
> > print Dumper $w'
> > $VAR1 = {
> > 'x' => {
> > 'y' => {
> > 'z' => 'hello'
> > }
> > }
> > };
>
> Yes, of course, but wrapping line at space (or tab) is better readable for
> human and for perl novice too ;-)
> --
> Petr Vileta, Czech republic
> (My server rejects all messages from Yahoo and Hotmail. Send me your
> mail from another non-spammer site please.)
>
> Please reply to <petr AT practisoft DOT cz>

Thanks one and all for making it clear....

Similar ThreadsPosted
How long is too long for cgi script? April 22, 2005, 12:07 pm
ignore new line for long string August 8, 2005, 10:05 am
breaking a long arithmetic statement into multiple line December 4, 2006, 8:20 pm
Having problems parsing command line options using Getopt::Long on windows December 2, 2004, 8:48 am
'long long integer' in Perl February 15, 2006, 2:30 pm
Long running CGI script June 17, 2005, 4:13 am
script quitting abruptly (long) June 17, 2005, 8:00 am
script to find the files with very long names June 12, 2006, 3:34 am
How to pass a range (2 .. 42) by Getopt::Long to a script? March 6, 2008, 6:38 pm
automate command line script using perl June 15, 2006, 1:32 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap