473,651 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About basic Perl

crystal2005
44 New Member
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
4 1542
nithinpes
410 Recognized Expert Contributor
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
4,059 Recognized Expert Specialist
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
44 New Member
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
4,059 Recognized Expert Specialist
It is within the realm of possibility that you could learn to do that specific task in two weeks time.
Mar 22 '08 #5

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

Similar topics

220
18993
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
54
6542
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO FRICKIN' COOL!!! ***MAN*** that would save me a buttload of work and make my life sooooo much easier!" As opposed to minor differences of this feature here, that feature there. Variations on style are of no interest to me. I'm coming at this from a...
5
1466
by: Andrea Griffini | last post by:
I'm new to python and I really like what I've seen so far with just one exception; the absence of a nice syntax for ranges of integers. I've read PEPs about allowing for i in 10: print i and I must say I don't like it very much, but I didn't find a discussion about what looks more natural
1
1981
by: James White | last post by:
I have a young nephew who appears to be developing into a natural geek/nerd/guru/whatever and as he learns I need to make sure that he stays on the side of the white hats, rather than going down the learning path of cracker/warez/illegal_downloading. I am retired and my fortran/cobol programming experience is not going to help him much. I have suggested that as a start he learn C++ to get in the nitty gritty of programming and perl to...
9
1708
by: Adam Monsen | last post by:
I kindly request a code review. If this is not an appropriate place for my request, where might be? Specific questions are in the QUESTIONS section of the code. ========================================================================== #include <stdio.h> #include <stdlib.h> #include <string.h>
21
1920
by: Roy Smith | last post by:
I'm working on a product which for a long time has had a Perl binding for our remote access API. A while ago, I wrote a Python binding on my own, chatted it up a bit internally, and recently had a (large) customer enquire about getting access to it. I asked for permission to distribute the Python binding, and after a few weeks of winding its way through the corporate bureaucracy I got an email from a product manager who wants to meet...
23
4327
by: TefJlives | last post by:
Hi all, I'm learning a bit about C, and I have a few questions. I'm not trying to insult C or anything with these questions, they're just honestly things I don't get. It seems like pointers to chars are just how you deal with strings, and pointers to pointers to char just give you arrays of strings. What is the advantage of this vs. languages with a string type?
6
6968
by: ashokbio | last post by:
I want to create an associative array, similar to PERL language, using Visual Basic 6. Example: Using PERL %A = ("A"=>"Apple","B"=>"Banana"); i.e., A is associated to the word Apple and B is associated to the word Banana. The alternative conversion is: $A{'A'} = "Apple"; $A{'B'} = "Banana";
3
1315
by: autodidact | last post by:
Hey Guys, would anyone care to explain whats going on; I have a few codes and i don't know why one works and the other doesn't. I'm playing around with concatenation operators "," and "." These are my codes. ALL THE CODES WORKED EXCEPT FOR THE LAST ONE!!! CODE ONE #! /usr/bin/perl
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.