in reply to Re: Perl Project: Text Search
in thread Perl Project: Text Search

I did try to access it. It says "you do not have access to this file". How do I go about opening a .bak file anyway?

It's an online class, I've completed 10 programming assignments already, this is our second perl assignment. I just wanted to make sure I wasnt missing something obvious before asking my teacher why I can't access the file. Thanks for your feedback.

Replies are listed 'Best First'.
Re^3: Perl Project: Text Search
by marto (Cardinal) on Apr 08, 2010 at 12:09 UTC

    I suspect the passwd.bak in question is simply a copy of a *nix passwd, the .bak extension suggests that it's an backup copy rather than the live passwd file. You'll simply read the file as though it were any other text file. If you can't open the file for reading then you may need to contact the person who assigned the task. Good luck.

      i discovered i was typing in the filename wrong. password.bak instead of passwd.bak

        A mistake on someones part then, in your first post you quote "passwd.bck", perhaps the person setting up this exercise made a mistake. Regardless, you've found a readable file, hopefully it will contain the data you need.

Re^3: Perl Project: Text Search
by cdarke (Prior) on Apr 08, 2010 at 12:12 UTC
    How do I go about opening a .bak file anyway?

    open and see perlopentut. The fact that the filename ends in .bak is irrelevant - what is important is the format of the data within.
      when i tried to open it i was typing in the filename wrong. Ive got access to it now