--- Chris Zampese <[EMAIL PROTECTED]> wrote: > I have a program that takes input from a form, splits it and saves the values in an >array - > $INPUT{field} > I then create a NET::SMTP mail instance, and message is a string ($mymessage) in >which I have > inserted the form values. > This is so that I can create a form which when submitted will send another form with >part of the > data in its fields. > So my $mymessage looks like this (but alot longer)... > > $mymessage='<HTML><HEAD></HEAD><BODY> > <form name =formname> > <BR> > <input type = text name=whatever value=$INPUT{field_name}> > etc > > then I want to pass the string through a regex so that it will espand all the >$INPUT{field_name} > occurances.
Hmm... where are you getting that from? If the above code is embedded in your program, changing the single quote ' to a double quote " will cause $INPUT{field_name} to be interpolated: my $foo = "Ovid"; print "$foo\n"; print '$foo\n'; Output: Ovid $foo\n You should be able to drop the regex entirely. Cheers, Curtis "Ovid" Poe ===== "Ovid" on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]