> -----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 = shift; # grab the first element from @_
   # or
   my $cleanedText = $_[0]; # refer to the first element of $_[0] directly

  
>  $cleanedText =~ s{<p>}{<p class='bodytext'>}g;
>  $cleanedText =~ s{<b>}{<span class='bodybold'>}g;
>  $cleanedText =~ s{<\/b>}{<\/span>}g; 
>  $cleanedText =~ s{<a href}{<a class='bodytext' href}g;
>  
>  return $cleanedText;
> }
>  

@_ is the list of arguments passed to a sub.  

[snip]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to