Re: making print not wantarray

2004-06-17 Thread WilliamGunther
In a message dated 6/17/2004 5:32:16 PM Eastern Standard Time, [EMAIL PROTECTED] writes: >I knew about that but the problem is most of the users (incuding myself >;p) will want to print it without the same $header info twice and don't >want to have a bunch of print scalar whatevr(); > >If there

Re: making print not wantarray

2004-06-17 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: If the enduser programmer want to force it into scalar context they can: print scalar fooyou(); I knew about that but the problem is most of the users (incuding myself ;p) will want to print it without the same $header info twice and don't want to have a bunch of print s

Re: making print not wantarray

2004-06-17 Thread WilliamGunther
If the enduser programmer want to force it into scalar context they can: print scalar fooyou(); -will http://www.wgunther.tk (the above message is double rot13 encoded for security reasons) Most Useful Perl Modules -strict -warnings -Devel::DProf -Benchmark -B::Deparse -Data::Dumper -Clone -

making print not wantarray

2004-06-17 Thread JupiterHost.Net
Howdy group, If you have a function that returns different things based on if they want an array or not how can you force print to be in scalr context? for instance: sub fooyou { my $header = 'whatever'; my $data1 = 'data1'; my $data2 = 'data2'; return ("$header$data1","$header$data2") if