[19298] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1493 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 10 21:10:33 2001

Date: Fri, 10 Aug 2001 18:10:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <997492214-v10-i1493@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 10 Aug 2001     Volume: 10 Number: 1493

Today's topics:
    Re: need good book about reading text files (Tad McClellan)
    Re: perlTK syntax question <goldbb2@earthlink.net>
    Re: permuting extremely large string (Abigail)
    Re: Pipe the output of a command to script <goldbb2@earthlink.net>
    Re: Poor man's HTML hidden field message digest?? <miscellaneousemail@yahoo.com>
    Re: regex question... <ren@tivoli.com>
    Re: Replying to posts <friedman@math.utexas.edu>
    Re: Replying to posts <goldbb2@earthlink.net>
    Re: Replying to posts (Tad McClellan)
    Re: Replying to posts <tinamue@zedat.fu-berlin.de>
    Re: Search Engine Question <Tassilo.Parseval@post.rwth-aachen.de>
    Re: Search Engine Question (E.Chang)
    Re: Self-Searchable Perl documention - Extremely Useful <goldbb2@earthlink.net>
    Re: Simple Permutation Calculator <godzilla@stomp.stomp.tokyo>
    Re: Simple Permutation Calculator <friedman@math.utexas.edu>
    Re: Unable to retain required "+" from STDIN <gnarinn@hotmail.com>
    Re: unwanted ARGV[0] passing to "<>;" as input <gnarinn@hotmail.com>
    Re: Using TRUE constant in IF expression?? <gnarinn@hotmail.com>
    Re: voodoo cookie hash problem <gnarinn@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 10 Aug 2001 18:50:41 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: need good book about reading text files
Message-Id: <slrn9n8pa1.2ad.tadmc@tadmc26.august.net>

Ponzie B. Pogie <ponzie_b_pogie@hotmail.com> wrote:
>Does anyone know of a good perl book which goes in depth about reading
>textfiles, navigating within those files, and generating reports? 


That sounds like this book:

   "Data Munging with Perl"   David Cross   (Manning Publications)

[ Disclaimer: I work for Manning, so don't take my word for it. ]


>In
>other words, manipulating the $_ variable. 


That is not an accurate rephrasing.


>The books I have don't show
>very much on it.


Maybe because it is Just A Variable. Whatever they show with
$var you can do with $_.

You realize that books are only a 3rd level resource anyway, don't you?

The standard Perl docs and newsgroup archives are where you
should look first.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Fri, 10 Aug 2001 20:27:06 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: perlTK syntax question
Message-Id: <3B747BDA.E5B08B96@earthlink.net>

Stan Brown wrote:
> 
> I'm doing my first serious perlTK script, and I have a very simple
> syntax question.
> 
> I have been creating widgets like this:
> 
> $entry   = $Table->Entry(-textvariable => \$data_fields{$col} ,
>                 -relief => 'sunken' ,
>                 -validate => 'focusin' ,
>                 -validatecommand => sub
>                      {
>                           Enter_entry_fields($col)
>                      },
>                 -width => "$$hash_pointer{$col}{'DATA_PRECISION'}");
> 
> And now I need to create some scrolled listboxes. The example code in
> the widget demo uses a different method, involving qw//. I was
> wondering if someone could look at the following, and see if I am
> interpeting corectly the way to translate the above.
> 
>                 $entry = $Table->Scrolled(qw/Listbox
>                        -height 1
>                        -relief 'sunken'

Since qw is already quoting, this line is sort of like
-relief => "'sunken'", which I doubt is what you want.

>                        -width  "$$hash_pointer{$col}{'DATA_PRECISION'}
>                        -validate  'focusin'
>                        -validatecommand  sub
>                                  {
>                                   Enter_entry_fields($col)
>                                  },
>                        -setgrid 1 -scrollbars e/);
> 
> What I hope this does is create a scrolled listbox with properties
> just like the Entry widget abov. I recognize I will have to fill in
> the valuse seperately.

$entry = $Table->Scrolled('Listbox',
	-height => 1, -relief => 'sunken',
	-width => $hash_ref->{$col}{DATA_PRECISION},
	-validate => 'focusin'
	-validatecommand => sub { Enter_entry_fields($col) },
	-setgrid => 1, -scrollbars => "e",
);

Or:
$entry = $Table->Scrolled(qw[ Listbox
	-height 1 -relief sunken
	-width ], $hash_ref->{$col}{DATA_PRECISION}, qw[
	-validate focusin
	-validatecommand ], sub { Enter_entry_fields($col) }, qw[
	-setgrid 1 -scrollbars e ],
);


-- 
I need more taglines. This one is getting old.


------------------------------

Date: 10 Aug 2001 22:07:55 GMT
From: abigail@foad.org (Abigail)
Subject: Re: permuting extremely large string
Message-Id: <slrn9n8mql.8dn.abigail@alexandra.xs4all.nl>

Les Ander (citykid@nospam.edu) wrote on MMCM September MCMXCIII in
<URL:news:Pine.LNX.4.33.0108091115180.2586-100000@schewanella.stanford.edu>:
"" Hi,
"" i need to permute a string which is about 4 Mb!
"" I experience  memory problems if i convert it to an array (the program
"" crashes). So I need to permute the string inplace without converting
"" it into an array.
"" A simple strategy i am thinking of is follows...
"" 
"" sub perm_string
"" {
""   my $str_ref=shift @_;
""   my $len=length $$str_ref;
""   for (1..1000){
""      my $start=int rand($len-1);
""      my $size=int rand($len-$start-1);
""      my $temp_str=substr($$str_ref, $start,$size);
""      substr($$str_ref, $start, $size)='';

This is not at all efficient. Since you are replacing something in 
the string by something of a different size, Perl has to shift 
characters around. That means millions of characters - at each loop.

""      $$str_ref.=$temp_str;
""   }
"" }
"" 
"" it took about 45 seconds when i tried it on a string of length about
"" 5,000,0000 characters.
"" Is there a way to speed it up?
"" also, can some one think of a better algorithm?


sub shuffle {
    # No need to pass a reference - Perl passes by reference anyway.
    local $_ = $_ [0];

    for (my $i = length; $i; ) {
        my $r = int rand $i --;
       (substr ($_, $r, 1), substr ($_, $i, 1)) =
                           (substr ($_, $i, 1), substr ($_, $r, 1));
    }

    $_
}


Abigail

-- 
INIT  {print "Perl "   }  #  Two flying doves. A
END   {print "Hacker\n"}  #  nesting thrush. A singing lark.
BEGIN {print "Just "   }  #  A duck flies away.
CHECK {print "another "}


------------------------------

Date: Fri, 10 Aug 2001 20:31:01 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Pipe the output of a command to script
Message-Id: <3B747CC5.C84F5727@earthlink.net>

joeybach wrote:
> 
> I am looking to pipe the output of a command to a script, like grep foo
> |./perl.pl.
> process the output of the grep in the perl script.
> Does IO::Pipe handle this?
> I just don't no where to start to look for this

#! perl
@ARGV = ("grep pattern file|");
while( my $line = <> ) {
	# do stuff with $line
}
__END__

Or using perl's builtin grep:
#! perl
@ARGV = ("file");
while( my $line = <> ) {
	next if !/pattern/;
	# do stuff with $line
}
__END__

Using an appropriate builtin (if one exists) is almost invariably faster
than using an external program.

-- 
I need more taglines. This one is getting old.


------------------------------

Date: Fri, 10 Aug 2001 22:51:21 GMT
From: Carlos C. Gonzalez <miscellaneousemail@yahoo.com>
Subject: Re: Poor man's HTML hidden field message digest??
Message-Id: <MPG.15de1329fdda8f9c989728@news.edmonton.telusplanet.net>

In article <997472826.81574767222628.gnarinn@hotmail.com>, gnari at 
gnarinn@hotmail.com says...

> if you want a message digest, why not use Digest::MD5 ?
> it is easy to use, and much more likely to be foolproof than a quick hack
> 

Definitely more foolproof than mine.  That's for sure.  I will have to 
look at Digest::MD5.  Didn't even dawn on me that there might be a 
package for this.  

Thanks gnari.

-- 
Carlos 
www.internetsuccess.ca


------------------------------

Date: 10 Aug 2001 16:24:48 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: regex question...
Message-Id: <m3itfva9r3.fsf@dhcp9-161.support.tivoli.com>

On Fri, 10 Aug 2001, strawSPAM_BEGONEman@plexi.com wrote:

> Ren Maddox wrote:
> 
>>   s#\[(\d*)\]#[@{[$1-1]}]#g
> 
> Thanks Mr. M. They all work great.

You're very welcome.

> What's going on with the last one though?

It is using the fact that what's inside @{...} is evaluated as a block
even inside a string.  It must return an array reference, so using
@{[...]} allows you to put arbitrary code inside a double-quote
interpolated string (which the second part of a substitution
qualifies as).  You can do the same thing with ${\(...)}, but it
really is the same thing and the first one looks cleaner.  The latter
doesn't technically require the parens, but in practical use it
usually does.

-- 
Ren Maddox
ren@tivoli.com


------------------------------

Date: Fri, 10 Aug 2001 17:34:29 -0500
From: "Chas Friedman" <friedman@math.utexas.edu>
Subject: Re: Replying to posts
Message-Id: <3b74642c_2@feed1.realtime.net>


Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:3B7458E8.225A7A27@stomp.stomp.tokyo...
> If you try to include more quoted text than your own comments,
> more than three times, my hack trick will suck-up your hard drive
> and email it to steve.case@aol.com for his own use.
>
  Thanks for the warning; I hate it when that happens!
>
> Godzilla!
> --
> $_="47?85.58535?575-5-5.?"515.0";
> tr/.??873514".-T>/975318642abcdef/;
> s/([0-9A-Fa-f]{2})/sprintf("%c",hex($1))/ge;
> tr/"".--~Ts>o,f".??^?S > print$_=reverse$_;exit;

 Note: The above code doesn't seem to be executable; I think it doesn't
appear correctly in the newsreader window (Outlook Express or Netscape).
(The other "signature" code I've run all seems OK.) Is there embedded
binary?




------------------------------

Date: Fri, 10 Aug 2001 18:57:20 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Replying to posts
Message-Id: <3B7466D0.69C52124@earthlink.net>

Chas Friedman wrote:
> 
> When attempting to reply to a post, I often get an error message to
> the effect that the reply was not sent because there is more included
> (quoted) text than new text. Is this set by the newsgroup? (It doesn't
> seem to be anything set by my mail server.) Thanks for any comments!
>                                           cf

Does it happen immediately [the instant you click send] or is the error
something which comes to you in an email?  If the former, it's due to
your browser trying to force you to conform to it's idea of a "polite"
netizen.  If the latter, it's due to your posting to a moderated
newsgroup which has such a restriction.

comp.lang.perl.misc is not moderated, comp.lang.perl.moderated is.

Note that if you are reading c.l.p.misc, and reply to a post which was
crossposted to both c.l.p.misc and c.l.p.moderated, your message must be
approved by the moderator of c.p.l.moderated before it will be visible
on either group.

-- 
I need more taglines. This one is getting old.


------------------------------

Date: Fri, 10 Aug 2001 18:54:32 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Replying to posts
Message-Id: <slrn9n8ph8.2ad.tadmc@tadmc26.august.net>

Chas Friedman <friedman@math.utexas.edu> wrote:

>When attempting to reply to a post, 

[snip]

>It doesn't seem to be anything
>set by my mail server


News (Usenet, newsgroups) is not email.

Email is not news.

Email uses SMTP. News uses NNTP. 

Different protocols, different servers. Different.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 11 Aug 2001 00:02:25 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Replying to posts
Message-Id: <9l1smh$74q3o$3@fu-berlin.de>

Chas Friedman <friedman@math.utexas.edu> wrote:
> When attempting to reply to a post, I often get an error message to the
> effect
> that the reply was not sent because there is more included (quoted) text
> than new text. Is this set by the newsgroup? (It doesn't seem to be anything
> set by my mail server.) Thanks for any comments!

yeah, this newsgroup is very strict. solution:
forget the "> " quoting, just append the posting you're replying to
to the end of your answer unquoted. this will also make it
easier to read your posting. alternatively you can append
a very long .signature that is longer than the quoted text.
or try to append a huge attachment.

SCNR =)
(kids, don't try this at home)
regards, tina
-- 
http://www.tinita.de \  enter__| |__the___ _ _ ___
tina's moviedatabase  \     / _` / _ \/ _ \ '_(_-< of
search & add comments  \    \ _,_\ __/\ __/_| /__/ perception
---   Warning: content of homepage hopelessly out-dated   ---


------------------------------

Date: Sat, 11 Aug 2001 00:08:59 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Search Engine Question
Message-Id: <3B745B7B.9030608@post.rwth-aachen.de>

Stearnsie wrote:
> I am completely new to the world of programming, and I have made this
> website that searches a database and shows you the results. My problem
> is that when you enter in the name of the author and a year, the
> results show allll the articles from that author and allll the
> articles from that year, not just the articles with the author AND
> that year.

The code below does not look as though it accessed a real database (that 
is commonly an SQL-database). Using such a thing would make the above 
query quite trivial.

> I was wondering if I could get a little help here.... I got this code
> from an example website, and am using it for mine, so I have little
> knowledge of what things mean, but here's the part that there may be
> the problem:
> 
> chop;	# delete trailing \n
> 	if (/^\s*$/) {
> 		# break between records
> 		if ($match) {
> 			# if anything matched, print the whole record
> 			&printrecord($record);
> 			$nrecords_matched++;
> 		}
> 		undef $match;
> 		undef $record;
> 		next;
> 	}
> 
> 
> Sorry if this is a basic question, and/or I didn't give enough
> information, but any help would be much appreciated. Thanks.

Indeed, we would need more information. The above code is a slightly too 
small fragment to be useful. Does this code run inside a loop (looks as 
though), where does the matching take place and how does it look, what 
format has $record etc.

Tassilo



-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



------------------------------

Date: Fri, 10 Aug 2001 22:59:59 GMT
From: echang@netstorm.net (E.Chang)
Subject: Re: Search Engine Question
Message-Id: <Xns90F9C1F95FA41echangnetstormnet@207.106.92.86>

ccstearns@ucsd.edu (Stearnsie) wrote in 
<ac757ead.0108101401.27fbba68@posting.google.com>:

>I am completely new to the world of programming, and I have made this
>website that searches a database and shows you the results. My problem
>is that when you enter in the name of the author and a year, the
>results show allll the articles from that author and allll the
>articles from that year, not just the articles with the author AND
>that year.
>I was wondering if I could get a little help here.... I got this code
>from an example website, and am using it for mine, so I have little
>knowledge of what things mean, but here's the part that there may be
>the problem:
>
>chop;     # delete trailing \n
>     if (/^\s*$/) {
>          # break between records
>          if ($match) {
>               # if anything matched, print the whole record
>               &printrecord($record);
>               $nrecords_matched++;
>          }
>          undef $match;
>          undef $record;
>          next;
>     }
>
>
>Sorry if this is a basic question, and/or I didn't give enough
>information, but any help would be much appreciated. Thanks.
>

The code you show prints the record if $match is true, but you haven't 
indicated how the value of $match is determined.  The result you report 
suggests that you are testing for a match with author _or_ year rather 
than with author _and_ year.  Check your logic.

-- 
EBC


------------------------------

Date: Fri, 10 Aug 2001 20:15:24 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Self-Searchable Perl documention - Extremely Useful!
Message-Id: <3B74791C.D80D8AE5@earthlink.net>

John Holdsworth wrote:
[snip]
> You got me thinking here and I've published a short example
> perl application with a browser interface (a version of du).
> This could be a .html file but a ".hta" removes the IE-ness.
> 
> http://www.openpsp.org/source/util/du.hta.gz

This is a minor nitpick, but... shouldnt the two lines:
    open STDIN,  "<& $fd";
    open STDOUT, ">& $fd";
Actually be:
    open STDIN,  "<&=$fd";
    open STDOUT, ">&=$fd";
Since $fd is an integer, not a filehandle?
Or you could replace
    my $fd = fileno $connection;
With:
    local *FH = $connection;
    open STDIN,  "<&FH";
    open STDOUT, ">&FH";

Next, in sub searchFrame, you could use IO::Scalar to capture the stuff,
rather than joining on "\n"... eg:
sub searchFrame {
	my $out;
	my $capture = IO::Scalar->new(\$out);
	my $oldout = select $capture;
	print start_html( ... );
	print start_form( ... );
	...
	select $oldout;
	return $out;
}

Also, I notice:
print ... script( <<JS );
//    this doesn't work inside a ".hta"
//    document.forms[0].dir.select();
//    document.forms[0].dir.focus();
JS

Perhaps some variant of this might work:
print ... script( {-language=>PerlScript}, <<'PerlScript' );
	$document->{forms}[0]{dir}->select();
	$document->{forms}[0]{dir}->focus();
PerlScript

And lastly, where you have:

<frame src='javascript: parent.searchFrame();' application='yes'>

Would not:
<frame src='perlscript: $parent->searchFrame();' application='yes'>

work just as well?  Assuming that perlscript: psuedo-urls are supported
similarly to javascript: psuedo-urls.

NB I only use netscape, not IE, so I have no clue if any of the above
should work [well, I know that the IO::Scalar thing should work, but not
about the rest of it]

-- 
I need more taglines. This one is getting old.


------------------------------

Date: Fri, 10 Aug 2001 15:10:03 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Simple Permutation Calculator
Message-Id: <3B745BBB.81D3245A@stomp.stomp.tokyo>

Tassilo von Parseval wrote:
 
> Godzilla! wrote:

> > Being recently amused, as usual, by The CLPM Troll and
> > responses to himself under different names along with
> > my being stupefied to silliness by his repetitive code
> > errors in most of his articles, in which, he claims
> > broken code to work, this personal amusement led me
> > to write a simple permutation calculator to demonstrate
> > how ignorantly outlandish are some of his articles.
 
> Honestly, for the self-acclaimed queen of everything one would not
> expect such an ugly sentence.


Ahh... being annoyed, The CLPM Troll blathers like
the bumbling bozo he is truly.


Godzilla!  Queen Of One.


------------------------------

Date: Fri, 10 Aug 2001 17:52:34 -0500
From: "Chas Friedman" <friedman@math.utexas.edu>
Subject: Re: Simple Permutation Calculator
Message-Id: <3b746868_1@feed1.realtime.net>


Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
news:3B7456DF.658C817D@stomp.stomp.tokyo...
> #!perl
>
> my (@Input) = qw (G o d z i l l a R o c k s A n d R o l l s!);
>
> @Array = (1 .. $#Input + 1);
>
> $permutate = 1;
> $elements = 1;
>
> while (@Array)
>  {
>   $permutate = $Array[0] * $permutate;
>   print "Elements: $elements  Permutations: $permutate\n";
>   $elements++;
>   shift (@Array);
>  }
>
> exit;

Does this do anything besides compute n! for some range of n?
                         cf




------------------------------

Date: Fri, 10 Aug 2001 23:40:57 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Unable to retain required "+" from STDIN
Message-Id: <997486857.516253529582173.gnarinn@hotmail.com>

In article <e23997a6.0108100945.2b3797bd@posting.google.com>,
agent349 <agent349@yahoo.com> wrote:
>This is really bugging me... $values =~ s/\+/ /g; removes all "+"s
>from STDIN to clean up the data, fine. But I need to retain certain
>plus signs and pass them along. ie: If I submit "1+1=2" in my form,
>the plus is removed and what gets passed is "11=2", that ain't cool.
>Any ideas on how I can retain required plus signs and remove the rest?

maybe you should use CGI.pm

gnari


------------------------------

Date: Fri, 10 Aug 2001 23:58:18 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: unwanted ARGV[0] passing to "<>;" as input
Message-Id: <997487898.244006633758545.gnarinn@hotmail.com>

In article <af8f4877.0108101038.3090de39@posting.google.com>,
Christopher Dillon <monkfunk@my-deja.com> wrote:
>if I do perl convert.pl tracks.txt it passes tracks.txt to the first
><>; which is supposed to prompt to create a new directory.
>
>----------------------------
>#!/usr/bin/perl
>
>$track_list=$ARGV[0];
>
>print "Enter a new dir\n";
>my $r = <>; chomp $r;

my $r = <STDIN>; chomp $r;



gnari




------------------------------

Date: Fri, 10 Aug 2001 23:51:02 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Using TRUE constant in IF expression??
Message-Id: <997487462.741666112560779.gnarinn@hotmail.com>

In article <MPG.15dd542a404bab7989725@news.edmonton.telusplanet.net>,
Carlos C. Gonzalez  <miscellaneousemail@yahoo.com> wrote:
>In article <x77kwd9nd9.fsf@home.sysarch.com>, Uri Guttman at 
>uri@sysarch.com says...
>
>> sub valid_string {
>> 	my ($string) = @_ ;
>> # see if any bad chars are in the string
>> 	return if $string =~ /[^a-zA-Z ]/ ;
>> # the string is ok
>> 	return 1 ;
>> }
>> 
>> isn't that much clearer? notice that the test has an empty return which
>> will be correctly false in all contexts.
>
>I looked up the documentation on the RETURN statement and it talked of a 
>version of this statement where no EXPR is given with it.  I am assuming 
>that this is what is meant by an empty return.  Where one has the 
>statement "return" without anything added.  Is this right?
>
>If so where is the empty return in the code snippet above? Would not the 
>result of the if test return something?  Making it non-empty? 
>

no. this is not 
  return (if $string =~ /[^a-zA-Z ]/);
anyways, 'if' is not a function, that returns a value. 

it is the
  STATEMENT if EXPR;
syntax as described in perlsyn (look for 'Simple statements')

so the line in question is equivalent to:
  if ($string =~ /[^a-zA-Z ]/) { return };

gnari

  


------------------------------

Date: Fri, 10 Aug 2001 23:55:05 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: voodoo cookie hash problem
Message-Id: <997487705.486029132734984.gnarinn@hotmail.com>

In article <dc31dfbf.0108101037.169acbd8@posting.google.com>,
Mongo <mongo@firewallx.com> wrote:
>I have a hash of cookies.
>anytime i try to use a value while putting a mail message together it
>comes out blank. If i want to use a value for anything else its fine,
>like:
>
>$email = $cookies{email};
>print "$cookies{email}\n";
>
>but as soon as I try to use the same value in a mail message it
>reslults in a blank space.??

no, there is no special code in the perl interpreter that detects that
a string is going to be used in a email message.

you simply have a bug in your code. show us the part where you use
the value in your mail message.

gnari



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 1493
***************************************


home help back first fref pref prev next nref lref last post