Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Unable to write output to file taken as input from command line

by muba (Priest)
on Jul 24, 2014 at 13:03 UTC ( #1094910=note: print w/replies, xml ) Need Help??


in reply to Unable to write output to file taken as input from command line

First of all, you don't have to open DATA to read from it. Also, without looking it up or testing it, I'm not too sure what these two lines, in this combination, are supposed to do:

open my $in, "<", $infile; open(DATA,$in);
but it looks wrong to me. Would you care to elaborate as to what your intensions were here?

The next thing that strikes me as odd is the ins split /,\s*/ for <DATA>; line: where is ins defined? Is it imported from somewhere? Did you forget to include the relevant use ...; statement or the actual subroutine itself? Because as is, your code won't even run without an error message regarding this line.

Not to mention the fact that your code has use strict; and then uses an undeclared variable:

C:\Users\Lona\Desktop>perl x.pl syntax error at x.pl line 15, near "ins split" Global symbol "%group" requires explicit package name at x.pl line 16. Execution of x.pl aborted due to compilation errors. C:\Users\Lona\Desktop>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2019-04-22 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (112 votes). Check out past polls.

    Notices?