Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Okay I am going to be really technical here don't mean to throw off anyone and I am not trying to brag...

I am trying to do ordering of numbers that are in the end of a list of data

So I am trying to use PERL SORT:
SORT [/R] [/+n] [[drive1:][path1]filename1] [> [drive2:][path2]filena +me2] [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]
This seems to be the syntax which is easy for me to figure out cause I am an old hacker! What I don't get is the perl part of it

#!/usr/bin/perl use strict; OPEN "filename"/n"; COUNT |||||| #this counts spaces over in the list SORT /R #this sorts my data
This spews all kinds of computer generated errors....
Bareword "COUNT" not allowed while "strict subs" in use at ./order.pl +line 5. syntax error at ./ray.pl line 5, near "||||" Bareword "SORT" not allowed while "strict subs" in use at ./order.pl l +ine 6. Bareword "R" not allowed while "strict subs" in use at ./order.pl line + 6. Execution of ./ray.pl aborted due to compilation errors. Bareword "OPEN" not allowed while "strict subs" in use at ./order.pl l +ine 5. String found where operator expected at ./order.pl line 5, near "OPEN +"filename"" (Do you need to predeclare OPEN?) syntax error at ./order.pl line 5, near "OPEN "filename"" Bareword "n" not allowed while "strict subs" in use at ./order.pl line + 5. String found where operator expected at ./order.pl line 5, at end of l +ine (Missing semicolon on previous line?) Can't find string terminator '"' anywhere before EOF at ./order.pl lin +e 5.
I know this is pretty technical but if anyone out there could offer some tips ..I am not trying to "compile" anything either so these errors don't make much sense to me

Unconsidered for reap - Votes: Keep: 11, Edit: 0, Reap: 9


In reply to question about ordering technical data numbers by Kevin_Raymer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found