5

Is shell scripting in perl in range of this site?

or is perl hacking for SO?

4

How do you shell script in Perl? Perl is not a shell.

In any sense I think it depends on the nature of your Perl. Perl is required by one of the Unix or Linux standards. It is Unix, in a sense, where, for example, Ruby is not, because of this requirement.

I'm going to use this answer to illustrate what kind of Perl I think is acceptable here. Essentially these are 1 liners. I'd definitely avoid anything over 10 lines.

However, I think it'd be best if you didn't ask Perl Questions here, SO is much more suited for these questions that here. I don't think we'd allow shell scripting if it wasn't so integral to Unix. On the flip side, if you ask a generic question that you know is likely to result in a Perl answer, like I did (and yes I already knew about the Perl solution), I'm ok with that. If you ask How do I take X Perl and convert it to Shell, or vice versa, I'm ok with that. I may also be ok with "what does X Perl do" if it seems fairly admin-ish. If it seems too programming-ish it probably doesn't belong here.

Am I making any sense?

  • I think so, but my first idea was the purpose of the script and not the size. – Johan Nov 7 '10 at 20:31
  • 2
    This makes sense; answers to "how do I do this on the CLI" that involve perl make sense, but "how do I write this in Perl?" probably don't, unless they're really trivial – Michael Mrozek Nov 7 '10 at 21:00
  • Something like that :) – Johan Nov 7 '10 at 21:52
  • @Johan I'm thinking complexity... something simple should be accomplish-able in only a few lines... where something complex will take more, and is probably beyond our scope. – xenoterracide Nov 7 '10 at 23:29
  • It is easier to mark a line in the sand based on purpose of question then on the complexity, but I see what you mean. – Johan Nov 8 '10 at 4:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .