viffer has asked for the wisdom of the Perl Monks concerning the following question:
<grovel>Hi wonderful smart people </end grovel>
Hopefully this makes sense
I am processing an afp file
I want to see the value of a certain string so I can use
printf "Triplet_Values = <hex: %*v2.2X>\n", ' ', $data;
The problem is this writes it to stdout
What I want to do is assign it to a variable and write that variable to a log file, or pass that variable back to the calling routine
eg something like
But all the apostrophes are making it beyond my capabilities.my $variable=printf "--INSIDE Get_Triplet_Values = <hex: %*v2.2X>\n", +' ', $data; print LOG $variable
Any help gratefully received.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Assigning printf to a variable
by Athanasius (Archbishop) on Oct 19, 2021 at 14:06 UTC | |
Re: Assigning printf to a variable
by hippo (Bishop) on Oct 19, 2021 at 14:07 UTC | |
Re: Assigning printf to a variable
by Fletch (Bishop) on Oct 20, 2021 at 05:20 UTC | |
by haukex (Archbishop) on Oct 20, 2021 at 08:04 UTC | |
by pryrt (Abbot) on Oct 20, 2021 at 14:56 UTC | |
by Bod (Parson) on Oct 20, 2021 at 12:19 UTC | |
by pryrt (Abbot) on Oct 20, 2021 at 14:43 UTC | |
Re: Assigning printf to a variable
by viffer (Beadle) on Oct 20, 2021 at 04:53 UTC |
Back to
Seekers of Perl Wisdom