Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Testing <>

by ikegami (Pope)
on Oct 03, 2011 at 15:44 UTC ( #929368=note: print w/replies, xml ) Need Help??


in reply to Testing <>

The problem is that if there's no stdin and no command line args then the script just waits for input.

Just like cat, perl, sort, etc, etc, etc.

This is standard behaviour. Why does it matter to you? Both using -t and implementing a command line option that says there is no STDIN have their drawbacks.

Replies are listed 'Best First'.
Re^2: Testing <>
by Anonymous Monk on Oct 04, 2011 at 08:31 UTC
    > Just like cat, perl, sort, etc, etc, etc.
    > This is standard behaviour.

    Yeah, I know and I don't like it.

    I still think, as I did 20 years ago when I first started using UNIX, that these sitting commands waiting for user input was pretty pointless.

    I've never felt the urge to type in 'sort' enter some values then excitedly hitting ^D to see the result.

      I never manually type in stuff, but I often copy-and-paste stuff into a program like sort (or a Perl oneliner) to munge data. That would not be possible with your approach.

        copy and paste? Ugh. Not in this life :-).

        As an aside; these utilites where written long before such new fangled functions were available.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929368]
help
Chatterbox?
[Corion]: Discipulus: Well, in many cases it doesn't make sense to build an interface and complicated program just to enter 20 rows into a database ;) But yes, automating data imports should pay off in the long run
[LanX]: Choroba: this happened before I joined, was still in uni, but my boss was summoned to the CEO of the second biggest German bank at that time and could only say " I told them its not ready" ;)
[LanX]: memories....I missed my connection while chatting
[Discipulus]: in this case Corion we are speaking about software licensing: evry year or two we must rescan the whole ced to produce an excel report, while at every activation / disactivation we update a black box DB: i said that i a week i can produce the perl to..
[Discipulus]: rend out the xls IF i have access to the DB
[choroba]: LanX I miss working in a bank sometimes...
[Corion]: Discipulus: Ooof. Especially yearly things are things I like to automate instead of trying to remember how I did things last year...
[Corion]: And the second rule that I've learned is, that there is no one-off job, so writing a program for it pays off almost immediately. The third rule is to give all my programs numbers and have them reproduce that number in the name of their output files. :)
[Discipulus]: the true part is that also specification change between years.. but well our job is cheap but dont abuse of us.. ;=)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2017-03-29 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (350 votes). Check out past polls.