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

Re^3: New student, can we write this program in perl...

by MidLifeXis (Monsignor)
on Oct 19, 2012 at 16:58 UTC ( #999983=note: print w/replies, xml ) Need Help??

in reply to Re^2: New student, can we write this program in perl...
in thread New student, can we write this program in perl...

my @data = <> would be one way. Could always read one line at a time with while (<>) {...}. This is stuff that you or your instructor should have already covered in your course, isn't it?

Update: if not, take a look at perlintro, perlfaq, perlsyn, perldata, and so on.


Replies are listed 'Best First'.
Re^4: New student, can we write this program in perl...
by rahulraina7 (Initiate) on Oct 19, 2012 at 17:27 UTC
    In india we do have to do lots of research work like this, blame it to the poor teaching system.

      I find it ironic that you would ask us to write a solution for you rather than ask for assistance gaining a better understanding, and then in the same thread blame the "poor teaching system" for your not knowing how to do it. Decide now if you'll be the student who digs in and learns how to learn, or the student that gets weeded out after the 2nd semester (or the 2nd week on the job).

      Get familiar with the Perl documentation. perlintro is a good place to start, and contains 99% of what you need to accomplish the task you've been assigned. Reading through it will take an hour. Absorbing it will take a little more in-depth study. That should put you back on the path of the student who learns how to learn (and consequently goes much farther than those who just want to get through the course).


      This is not research. That involves actually studying the authoritative sources such as perldocs (which happen to be available at your console).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999983]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2018-06-24 21:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.