Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: redirection problem

by Happy-the-monk (Abbot)
on Jun 22, 2012 at 09:04 UTC ( #977801=note: print w/replies, xml ) Need Help??

in reply to redirection problem

What can be the reason, that > output.txt creates empty file output.txt and perl > output.txt creates output.txt with data produced by

Does the execution of the first command produce any errors on STDERR (the cmd/dosbox/shell/terminal)?

What does the first line of look like?

What kind of a shell/terminal are you using?

Cheers, Sören

Replies are listed 'Best First'.
Re^2: redirection problem
by grizzley (Chaplain) on Jun 22, 2012 at 09:29 UTC
    No, there are no errors on STDERR:
    C:\>type #!perl print 'abc' C:\> > noperl.txt C:\>perl > perl.txt C:\>type noperl.txt C:\>type perl.txt abc C:\>assoc .pl .pl=Perl C:\>ftype Perl Perl="C:\Perl64\bin\perl.exe" "%1" %*
    I use standard Windows console.

      Do a  dir scrip*

      Also try

      #!/usr/bin/perl -- use strict; use warnings; use File::Find::Rule; use Env qw/ @PATH /; use Data::Dump; dd( find( 'file', 'name', qr/script/i, 'maxdepth', 1, 'in', \@PATH)); __END__
        You mean I have another script with the same name? No, it happens with all scripts I write, there must be some setting in the system or maybe this specific ActivePerl 5.14.2 + Win 7 configuration. Previously on Win XP with ActivePerl 5.12 it was working fine (I'll try to install 5.12 in a moment to check this).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977801]
[choroba]: Playing in a punk rock band for 20 years... my hearing is quite bad
[Corion]: I still have hopes to turn my godson and his two siblings into a punk band ;)
[Corion]: Their older sister just started piano but has been interested in drumming, which she should be able to start with 8 years or so)
[Discipulus]: ah was Kink of Bongo 1992..
[1nickt]: choroba name of band? youtube link? MySpace link?
[Your Mother]: I like Manu Chao.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2017-03-24 12:24 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (301 votes). Check out past polls.