Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: getting wrong value

by ggrise (Initiate)
on Jan 15, 2013 at 23:01 UTC ( #1013468=note: print w/replies, xml ) Need Help??

in reply to Re: getting wrong value
in thread getting wrong value

Thanks, that works. however if printf will print to STDOUT, why can't I get it to print to $line2 ?

Replies are listed 'Best First'.
Re^3: getting wrong value
by AnomalousMonk (Chancellor) on Jan 15, 2013 at 23:09 UTC

    You can (since 5.8; see open, search for 'scalar'):

    >perl -wMstrict -le "my $scalar_as_file; ;; open my $fh_scalar, '>', \$scalar_as_file or die qq{opening: $!}; printf $fh_scalar q{xxx :%#x: yyy}, 55473; close $fh_scalar; ;; print qq{scalar as file: '$scalar_as_file'}; " scalar as file: 'xxx :0xd8b1: yyy'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013468]
[choroba]: You can also try DBD::MariaDB instead of MySQL
[choroba]: it's not on CPAN yet, unfortunately, so you have to install manually from github
[Spenser]: Thanks. I tried DBD::MariaDB just now. It can't find that module.
[Spenser]: oh, I'll check github

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-03-17 12:58 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (224 votes). Check out past polls.