Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Standard way for displaying a script's output.

by Anonymous Monk
on Feb 11, 2012 at 10:54 UTC ( [id://953209]=note: print w/replies, xml ) Need Help??


in reply to Re: Standard way for displaying a script's output.
in thread Standard way for displaying a script's output.

I'd much prefer to avoid Inline::Files , but no reason the user can't choose what kind of NEW QUESTION to ask

Do you have code, sample input, expected output? Ask your question with NEW QUESTION VROOM template

<p> I'm trying to merge and edit two files with this program (short ex +ample files in %data ) <code> #!/usr/bin/perl -s -- use strict; use warnings; use autodie; Main( @ARGV ); exit( 0 ); sub Main { if( $help ){ return print Usage(); } open my($in1) , '<', \$data{input1}; open my($in2) , '<', \$data{input1}; while( not( grep eof, $in1, $in2 ) ){ my $line1 = <$in1>; my $line2 = <$in1>; chomp $line1; print $line1, $line2; } close $in1; close $in2; } sub Usage { <<"__USAGE__"; $0 $0 -help $0 -foo $0 -oof=bar $0 -oof=bar baz __USAGE__ } ## end sub Usage BEGIN { our %data = ( input1 => \<<'__VROOM', __VROOM input2 => \<<'__VROOM', __VROOM expectedOutput => \<<'__VROOM', __VROOM ); } ## end BEGIN __END__ </code> <p> I want the get output $data{expectedOutput} but it gives me this +error message / faulty output:</p> <code> error message or faulty output here </code> <p> I'm trying to ... <p> I also tried ...

Replies are listed 'Best First'.
Re^3: Standard way for displaying a script's output.
by BrowserUk (Patriarch) on Feb 11, 2012 at 11:12 UTC

    Geez! Talk about overkill.

    First, look at the last line of my post.

    Second, are you really suggesting that every sample posted to ask a question here has to include a Usage section? Why not require formal test suite; and a perltidy formatting; and PBB compliance enforced by a documented, full perlcritic clean pass. Not forgetting a full GPL3 notice, liability waver. And a git repository link...

    If we raise the bar high enough ...


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Geez! Talk about overkill.

      choice is choice

      First, look at the last line of my post.

      What post? Why? JK? JK does not computer

      Second, are you really suggesting that every sample posted to ask a question here has to include a Usage section?

      For my template, sure, why not, goes along with the -s option , so it might as well

      Why require ... If we raise the bar high enough ...

      No thanks, I stay out of bars

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://953209]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-05-28 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found