Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hello there I am a student in desparate need of how to actually do this perl assignment I have to do by the 12th april.

Can you give me any tips as to what I have to write in order to succeed I doing this as I am still trying to pick this language up along with all the other ones as I am studying Web Design.

Help would be appricated
thanks simon
simonp5@yahoo.com

#!/usr/bin/perl # assignq1 # Q1 You are to write a script (or suite of scripts) that will perform + the following # administrative tasks. # The script is to take as an argument a directory. It is to search th +e directory's files # and perform the following. # A) htm files are to be renamed html. # B) any references to http within an htm/html file are to be changed +to https. # C) any html tags within html files are to be converted to upper case # (you may assume that <>s are used exclusively to identify html tags) +. # D) record in a log file each file that has been modified. # Additional tasks for additional credit # Your script is to work recursively through any sub-directories # Your script will not convert to upper case any SRC attributes of + a tag # Your log file will record each tag converted by your program # Data validation (really this should be part of the main spec!!!! +) // This is what I have started to do but is wrong I think??? print "Enter in only a directory name" $dirname = <>; chomp $dirname; if ( -d $dirname) { print "$dirname is a directory thankyou \n"; opendir(DIR, $dirname); @filenames = readdir(DIR); print"Directory is a $dirname \n"; foreach $filename(@filenames) { chomp ($filename); if (-d $dirname

Edit Petruchio Mon Mar 25 14:27:36 UTC 2002 - Added markup.


In reply to help please by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (9)
As of 2024-04-19 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found