Loading ...
Sorry, an error occurred while loading the content.

[PBML] Re: 2 Questions ...

Expand Messages
  • Jeff Boes
    ... No particular reason--the original file looked like the first line was special in some way, so I wanted to illustrate how you could separate it upon
    Message 1 of 7 , Feb 2, 2000
    • 0 Attachment
      > -----Original Message-----
      > From: Dan Boger [mailto:dan@...]
      > Sent: Wednesday, February 02, 2000 11:18 AM
      > To: perl-beginner@egroups.com; jboes@...
      > Subject: [PBML] Re: 2 Questions ...
      >
      >
      > > open (MYFILE, "<myfile.txt")
      > > or die "Can't open myfile.txt, $!";
      > > ($header_line, @lines) = <MYFILE>;
      > > close (MYFILE);
      > > chomp ($header_line, @lines);
      >
      > just curious - why the seperation of the $header_line from the rest of
      > the @lines?
      >

      No particular reason--the original file looked like the first line was
      "special" in some way, so I wanted to illustrate how you could separate it
      upon loading. That's clearer than slurping the whole file into one array and
      then dancing around the first line, if you need to make some kind of global
      change.

      ----
      "The future masters of technology will have to be lighthearted and
      intelligent. The machine easily masters the grim and the dumb."
      --Marshall McLuhan
      ___________________
      Jeff Boes <>< jboes@...
      Mur Consulting http://www.qtm.net/~jboes/
    Your message has been successfully submitted and would be delivered to recipients shortly.