Sudarshan Raghavan wrote at Fri, 07 Mar 2003 10:53:31 +0530:
>> sub cleanText{
>> my $cleanedText = @_;
>
> This is the problem, assigning an array to a scalar stores the number of
> elements in the array (in this case the number of args to cleanText) in
> the scalar ($cleanedText). Change this
"Johnstone, Colin" wrote:
> Gidday All,
>
> please help with my subroutine
>
Your call to this sub below offers a single string parameter--which happens to be
multiline.
>
> sub cleanText{
> my $cleanedText = @_;
#Since there is one element in @_, $cleanedText now has the value 1 or '1'
> $
> -Original Message-
> From: Johnstone, Colin [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 07, 2003 4:11 PM
> To: [EMAIL PROTECTED]
> Subject: PErl subroutine
>
>
> Gidday All,
>
> please help with my subroutine
>
> sub cleanText{
> my $cleanedText = @_;
>
my $cleanedText = s
On Fri, 7 Mar 2003, Johnstone, Colin wrote:
> Gidday All,
>
> please help with my subroutine
>
> sub cleanText{
> my $cleanedText = @_;
This is the problem, assigning an array to a scalar stores the number of
elements in the array (in this case the number of args to cleanText) in
the scalar