finhagen has asked for the wisdom of the Perl Monks concerning the following question:
I have tried putting my string into a array first:my $var1="fie; my $var2="fum"; $newvariable="fee $var1 fo $var2"; print "$newvariable\n";
I am sure its just a matter of using the correct apostrophes but so far my own efforts have not been rewarded with success.@newarray=(fee $var1 fo $var2); print "$newarray[0],$newarray[1],$newarray[2],$newarray[3]\n"; $gser2="$newarray[0],$newarray[1],$newarray[2],$newarray[3]";
As usual the wisdom of the perl monks is deeply appreciated,my @gser=('TME GSER', $dealn, 'PAS 927922','SO',$so); my $gser2= join ';', $gser[0],$gser[1],$gser[2],$gser[3],$gser[4]; worksheet->write_string(2, 4, $gsers); #input string into excel cell
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Aggregating text and variables into a new variable
by ccn (Vicar) on Nov 29, 2008 at 18:13 UTC | |
by finhagen (Sexton) on Nov 30, 2008 at 00:02 UTC | |
by shmem (Chancellor) on Nov 30, 2008 at 22:19 UTC | |
|
Re: Aggregating text and variables into a new variable
by toolic (Bishop) on Nov 29, 2008 at 20:00 UTC | |
|
Re: Aggregating text and variables into a new variable
by shmem (Chancellor) on Nov 29, 2008 at 20:25 UTC |