in reply to Perl Project: Text Search

"I don't think we are allowed to access it."

Umm, have you actually tried to access it? If the homework you've been given depends on accessing a file I suspect the powers that be will grant you access to do so.

"If anybody could direct me to some relevant tutorials or give me any kind of help here at all I'd greatly appreciate it. Thanks."

You've been tasked with writing a perl script, have you been to any classes? The problem you've been asked to solve is fairly typical for a first programming task. Perhaps working through some of Getting Started with Perl from the tutorials section of this site would be a good place to start, along with reading http://learn.perl.org.

Replies are listed 'Best First'.
Re^2: Perl Project: Text Search
by Sharp (Initiate) on Apr 08, 2010 at 11:29 UTC
    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.

      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
      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