Tom Allison wrote:
>>>I ended up with something like:
>>>my $string = join('',());
>>>my ($sql1, $sql2) = split(/\nn\n/sm, $string);
>> ^
>>You probably meant /\n\n/.
> Yes, thanks
>>
>>>But I like the $/ idea.
>>You could set $/ to paragraph mode:
>>
>>my ( $sql1,
>> I ended up with something like:
>> my $string = join('',());
>> my ($sql1, $sql2) = split(/\nn\n/sm, $string);
>^
>You probably meant /\n\n/.
Yes, thanks
>
>
>> But I like the $/ idea.
>
>You could set $/ to paragraph mode:
>
>my ( $sql1, $sql2 ) = do { local
Tom Allison wrote:
> Matija Papec wrote:
>> Tom Allison wrote:
>>
>>> I've been using the practice of putting something at the bottom of a
>>> file for holding static data, like SQL, by calling a __DATA__ handle:
>>>
>>> my $sql = join('',());
>>
>> #more efficient
>> my $sql = do { local $/; };
>
Matija Papec wrote:
Tom Allison wrote:
I've been using the practice of putting something at the bottom of a
file for holding static data, like SQL, by calling a __DATA__ handle:
my $sql = join('',());
#more efficient
my $sql = do { local $/; };
check perldoc perlvar if you want to know mo
Tom Allison wrote:
> I've been using the practice of putting something at the bottom of a
> file for holding static data, like SQL, by calling a __DATA__ handle:
>
> my $sql = join('',());
>
>
>
> __DATA__
> select .
>
>
> Is there any way to do this twice?
> To define two sets of static
Tom Allison wrote:
I've been using the practice of putting something at the bottom of a
file for holding static data, like SQL, by calling a __DATA__ handle:
my $sql = join('',());
#more efficient
my $sql = do { local $/; };
check perldoc perlvar if you want to know more about $/
__DATA__