By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,852 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,852 IT Pros & Developers. It's quick & easy.

About basic Perl

crystal2005
P: 44
Hello guys....

I'm newbie in Perl Language. So, in here i would like to ask several questions about Perl itself and not about the coding.

I have been given a task to use Perl for directory comparison and synchronization. I have to implement Perl scripts that accept two directories as input, compare the files and sub-directories under these two directories, and generate a well formatted report as the output. Since I'm a beginner in Perl, I'm getting confused about what the comparison mean. Is there anyone can give me a brief explanation and examples how it will be and looks like in Perl??

Additional task, i have to use Perl subroutines for tasks like checking directory names, comparing directories and generating formatted reports. What does subroutines in Perl use for??

Last question, What does POD actually use for?

Thanks a lot guys....
Mar 20 '08 #1
Share this Question
Share on Google+
4 Replies


nithinpes
Expert 100+
P: 410
Hello guys....

I'm newbie in Perl Language. So, in here i would like to ask several questions about Perl itself and not about the coding.

I have been given a task to use Perl for directory comparison and synchronization. I have to implement Perl scripts that accept two directories as input, compare the files and sub-directories under these two directories, and generate a well formatted report as the output. Since I'm a beginner in Perl, I'm getting confused about what the comparison mean. Is there anyone can give me a brief explanation and examples how it will be and looks like in Perl??

Additional task, i have to use Perl subroutines for tasks like checking directory names, comparing directories and generating formatted reports. What does subroutines in Perl use for??

Last question, What does POD actually use for?

Thanks a lot guys....
You can read through Beginning PERL to understand the basics of PERL.

To answer your questions in brief, comparing directories means comparing the list of files and sub-directories in a directory with the other. For this, you need to go through File Handling in detail. For report generation,you need to create a file and print the contents of directory in the desired format.As an example for how to open directories and get contents, you can go through this thread.

Subroutines are nothing but user-defined functions. They enable re-usability of a block of code and makes the script compact and tidy.

For PerlPOD, refer perlpod
Mar 20 '08 #2

KevinADC
Expert 2.5K+
P: 4,059
Comparing directories could mean just about anything, but generally it means compare the files and folders in the directories and see if they are the same or not.

Synchronization could also mean just about anything but I assume in this case it means to delete/transfer files/folders from one directory to the other until they are the same.

What is the nature of this project: work/school/personal interest?
Mar 20 '08 #3

crystal2005
P: 44
Comparing directories could mean just about anything, but generally it means compare the files and folders in the directories and see if they are the same or not.

Synchronization could also mean just about anything but I assume in this case it means to delete/transfer files/folders from one directory to the other until they are the same.

What is the nature of this project: work/school/personal interest?
The nature is for school project :D

Do you think this project is too difficult for a beginner?? I'm about to learn Perl in two weeks time only.

Thanks for the answers and hints.
Mar 22 '08 #4

KevinADC
Expert 2.5K+
P: 4,059
It is within the realm of possibility that you could learn to do that specific task in two weeks time.
Mar 22 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.