[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Using XML::RSS as a BBEdit Perl Filter



At 17.15 -0700 1999.10.25, Brian McNett wrote:
>Problem:  The method--
>
>$rss->parse();
>
>takes a STRING as its argument.  What I get from BBEdit is an ARRAY.
>
>Maybe:
>@myinput = <>;
>my $i = 0;
>
>while (@myinput) {
>   $rss->parse($myinput[$i]);
>   $i++
>}

Either use join() as Ronald says, or change the IRS to undef and slurp it
in.  Choice one:

  $myinput = join '', <>;

Choice two:

  { local $/;
    $myinput = <>;
  }

You may be able to think of others.  :)

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org