List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:May 18 1999 4:25am
Subject:Re: Now, How to sed on Perl Vars?
View as plain text  
On Tue, May 18, 1999 at 12:16:15AM -0400, Van wrote:
> But, in the header there are \n's and \t's.  How do I get rid
> of them?
> i.e.
> for (my $i = 0; $i < @emails; ++$i) {
>     my $headers = $emails[$i]{'headers'};
> 
>     print "Headers:";
>     foreach (sort keys %$headers) {
>         print "$_:|";
>         foreach (@{$headers->{$_}}) {
> 	    /* I would think print "$_:" | sed '/\//s//-/g' ->
> mynewvarwithoutlinefeeds */

            s/\s+/ /gs;

>             print "$_:";
>         }
>     }
>     print "\t";
>     print "Body:  ";
>     print $emails[$i]{'body'};
> }

If you're going to use Perl, you won't be using awk or sed unless
you're doing something the hard way.

Tim
Thread
Per User Password AdministrationVan13 May
  • Per User Password AdministrationMichael Widenius13 May
  • Re: Per User Password AdministrationChristian Mack14 May
  • PHP Tracking of Variables (was) Per User Password AdministrationVan16 May
  • Re: PHP Tracking of Variables (was) Per User Password Administration (Never Mind)Van16 May
  • Re: PHP Tracking of Variables (was) Per User Password AdministrationSasha Pachev17 May
    • Re: PHP Tracking of Variables (was) Per User PasswordAdministrationShafir17 May
  • Re: PHP Tracking of Variables (was) Per User Password AdministrationVan17 May
  • Re: PHP Tracking of Variables (was) Per User PasswordAdministrationVan17 May
  • Re: PHP Tracking of Variables (was) Per User Password AdministrationSasha Pachev17 May
  • Parsing of Mail files into a DatabaseVan18 May
    • Parsing of Mail files into a DatabaseMichael Widenius22 May
    • Parsing of Mail files into a DatabaseMichael Widenius22 May
  • Now, How to sed on Perl Vars?Van18 May
    • Re: Now, How to sed on Perl Vars?Thimble Smith18 May
  • Re: Now, How to sed on Perl Vars?Van19 May
Re: Parsing of Mail files into a DatabaseVan18 May
  • Re: Parsing of Mail files into a DatabaseDaniel E. White18 May
Re: Parsing of Mail files into a DatabaseVan18 May
  • Re: Parsing of Mail files into a DatabaseDaniel E. White18 May
Re: Parsing of Mail files into a DatabaseVan18 May