SPUG:Here documents

Dan Ebert mathin at mathin.com
Fri May 2 14:49:05 CDT 2003


You could use:

        if ( blah1 ) {
                while ( blah2 ) {
                        unless ( blah3 ) {
                                $something = qq(
                                        Here's my text
                                        ain't it fun
                                        heeha
                                );
                        }
                }
        }


instead of a HERE doc ... I don't like using HERE docs (for that reason,
mostly) so I usually do it this way.

dan.

On Fri, 2003-05-02 at 12:06, Brian Hatch wrote:
> Ok, I should know the answer to this...
> 
> Is there any way to allow a HERE document delimiter to be indented?  Ala
> 
> 		
> 	if ( blah1 ) {
> 		while ( blah2 ) {
> 			unless ( blah3 ) {
> 				$something = <<EOM
> 					Here's my text
> 					ain't it fun
> 					heeha
> 				EOM
> 			}
> 		}
> 	}
> 
> 
> Instead of having EOM at position 0 on the line?
> 				
> 
> 
> 
> 
> 
> --
> Brian Hatch                  Smith & Wesson:
>    Systems and                The original
>    Security Engineer          Point and Click
> http://www.ifokr.org/bri/     device.
> 
> Every message PGP signed



More information about the spug-list mailing list