in reply to i am suppsed to do following. i am super new. can anyone help me?

Are you having trouble with using a text editor to create the file (step 1), or with adding an open statement and a print statement to the code already provided in step two?

  • Comment on Re: i am suppsed to do following. i am super new. can anyone help me?

Replies are listed 'Best First'.
Re^2: i am suppsed to do following. i am super new. can anyone help me?
by Anonymous Monk on Jan 27, 2016 at 20:26 UTC

    In fairness he would have to remove a - too.

Re^2: i am suppsed to do following. i am super new. can anyone help me?
by vallecha420 (Initiate) on Jan 27, 2016 at 20:58 UTC
    adding the open and print statement

      perlintro#Files-and-I/O has documentation on how to open a file for input, and how to read from a file. Your assignment also shows the example, "$line = <TEST-INPUT>;", which will work to read a line from the file with one exception: Filehandles, like other identifiers in Perl shouldn't have a hyphen in them. Remove that hyphen and it becomes a valid identifier for a filehandle. Just make sure that your open opens the filehandle first.

      perlintro#Basic-syntax-overview shows how print can be used to print a string literal. perlintro#Perl-variable-types shows how to print a variable, such as $line.


      Dave