Sponsored Content
Top Forums Shell Programming and Scripting Difference between .pm and .pl files Post 302293363 by KevinADC on Tuesday 3rd of March 2009 03:21:51 AM
Old 03-03-2009
There is no difference between a .pm and a .pl file. The extensions are purely for convenience. If you "use" a module the "use" function assumes the extension is .pm. If you "require" a module you can name it anything you want.

.pm is used to signify that the file is not the main program but imports some methods or functions into the main program.

When to decide if a file should be a module? That is entirely up to you. If your main program is getting long it might be best to break it up into modules for ease of maintenance or for future additions to the main program. Modules could have common functions, like file I/O stuff in one module, database stuff in another, or they could be broken into major functions of your program. Like if you were writing an inventory program, one module might be used for moving items from one inventory location to another, one module might be used to pull items from inventory, another to add items to inventory.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

difference b/w files

i have 2 files file 1---------> hello file 2---------> hello world is there any command that we find the diff b/w two files and gives the ans as what is not matched with file 2. diff file 1 file 2 here the desired o/p should be: world as "world" is not found in file 1. (2 Replies)
Discussion started by: ali560045
2 Replies

2. Shell Programming and Scripting

Difference of more than 2 files....

Hi All, I need your help to find out the difference between 3 files. How can i get the output which says that FILE2 contains additional (YYY,900,100) compare to FILE1 and FILE3 contains addition record (ZZZ,904,908) compare to FILE1? I have tried using diff3 command, but was not able to get... (2 Replies)
Discussion started by: Amit.Sagpariya
2 Replies

3. Shell Programming and Scripting

Difference between files

I have two files like follows: - File 1: - A 20 B 15 D 10 C 6 File 2: - B 21 A 20 C 11 D 10 Now I want file like this: - It should pick up 'A' from File 1 and pick up 'A' from File 2 and should get difference of the numbers in 2nd column and display result as follows ... (2 Replies)
Discussion started by: balu_puttaganti
2 Replies

4. Shell Programming and Scripting

Difference between two files

HI Folks, sorry if it is a naive question. i have two files . "file1.txt" & "file2.txt" contents in files: file1.txt file2.txt -------- --------- 1 ... (2 Replies)
Discussion started by: babusek
2 Replies

5. Shell Programming and Scripting

difference in files.

Hi All, **************************************************************** File1: CREATE TABLE "TESTIHUB"."CINEMA" ( "NAME" VARCHAR2(20), "ACTOR" VARCHAR2(20), "YEAR" NUMBER ); / CREATE TABLE "TESTIHUB"."PANT" ( "CNAME" VARCHAR2(20), "AMOUNT" NUMBER, ... (1 Reply)
Discussion started by: naree
1 Replies

6. Shell Programming and Scripting

difference between two files

i have two files A and B and i want the difference to be printed in file C as in example below File A 10E32E7BCC5881DDB6||002878|1|1| 10E32E7BCC5881DDB7||002878|1|1| 10E32E7BCC5881DDB8||002878|1|1| 10E32E7BCC5881DDB9||002878|1|1| File B 10E32E7BCC5881DDB1||002878|1|1|... (4 Replies)
Discussion started by: tomjones
4 Replies

7. UNIX for Advanced & Expert Users

Difference between two files?

I need the get the difference between 2 files and the result, I need to output it to an other file file1 1 1 2 file2 1 1 2 3 Result....File3=3 used diff file1 file2 > file3 ( not working as expected)..Exact requirement..I have 2 flatfiles to compare and load only the difference in a... (0 Replies)
Discussion started by: win4luv
0 Replies

8. UNIX for Dummies Questions & Answers

Difference in two files

Hi all, I have problem in finding the difference. suppose i have two file file1 file2 1xyz 1xyz 1asd 1xyz 1asd 1abc 2adf 1asd 3asd 2abd 4abc 2adf 3asf I need to... (7 Replies)
Discussion started by: XXLMMN
7 Replies

9. Shell Programming and Scripting

How to get the difference with 4 files?

HI Team, Could you please help me here. I need to compare 4 files a) 1 2 3 4 b) 1 5 3 4 c) 1 2 5 (1 Reply)
Discussion started by: madhuchilipi
1 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
xfsinvutil(8)                                                 System Manager's Manual                                                xfsinvutil(8)

NAME
xfsinvutil - xfsdump inventory database checking and pruning utility SYNOPSIS
xfsinvutil [-F|-i] [-m media_label] -M mount_point mm/dd/yyyy xfsinvutil [-F|-i] [-m media_label] -u UUID mm/dd/yyyy xfsinvutil [-F] -s SESSION_ID xfsinvutil -i xfsinvutil -C DESCRIPTION
xfsdump maintains an online dump inventory in /var/lib/xfsdump/inventory. The -I option of xfsdump displays the inventory contents hierar- chically. The levels of the hierarchy are: filesystem, dump session, stream, and media file. xfsinvutil is a utility to check this inventory database for consistency, to remove entries of dump sessions which may no longer be of rel- evance, and to browse the contents of the inventory. The following command line options are available: -F Don't prompt the operator. When xfsinvutil encounters a matching dump session, xfsinvutil will normally ask the operator for permis- sion to delete the entry. With this option the deletion is performed, no questions asked. -i Interactive mode. Causes xfsinvutil to run in a mode that will allow the operator to browse and modify the contents of the inventory. Please refer to the Interactive Mode section below for more information. -M mount_point mm/dd/yyyy Prunes dump sessions identified by the given mount point which were created prior to the specified date. Optionally -m may be be spec- ified to further limit the matching dump sessions by media label. xfsinvutil will prompt the operator prior to pruning a dump session unless the -F or -i options are given. -u UUID mm/dd/yyyy Like -M, except the matching filesystem is specified using its universally unique identifier (UUID) instead of its mount point. -m media_label If specified, only sessions with at least one media file whose label matches this value will be eligible for pruning. This restric- tion is in addition to those imposed by the date and the -M or -u options. This option allows the pruning of all inventory references to media which may have been overwritten or lost. Note that this option does not apply to sessions with no media files. -s SESSION_ID Prunes the dump session identified by the given session id. xfsinvutil will prompt the operator prior to pruning a dump session unless the -F option is given. -C With this option, xfsinvutil performs consistency checks for all entries in the inventory database. It fixes any problems found. If no consistent entries are found , the corresponding inventory database file is removed. Interactive Mode When run with -i, xfsinvutil will present the operator with a hierarchical representation of the xfsdump inventory. In this mode, the operator can use the arrow keys (or the h j k l keys) to navigate the inventory and also use the following keys and functionality: + Expand a branch of the tree. - Collapse a branch of the tree. * Fully expand a branch of the tree. % Fully collapse a branch of the tree. h Move selection to the parent entry. l Move selection to the child entry. j Move selection to next entry. k Move selection to previous entry. d Mark the current record, and all sub-records, to be deleted. u Clear the current record and all parent records from being deleted. i Import another xfsdump inventory. ? Show help window. x Commit any changes made to the inventory, and exit the program. q Exit the program without committing any changes to the inventory. Inventories from other hosts can be imported to create a larger common inventory. It is recommended that the contents of /var/lib/xfs- dump/inventory on the remote host be copied to a temporary local directory prior to running xfsinvutil. When xfsinvutil is run in interac- tive mode, and the operator hits i, they will be prompted for the path to the inventory to be imported. xfsinvutil will then add the con- tents of the imported inventory to the main window, and all entries will be marked as imported. The operator can then delete any of these entries that are not to be imported. When the operator commits the changes, xfsinvutil will import any entries which were not marked as deleted. Deleted entries are not actually deleted from the original imported inventory. NOTES
Inventory Each dump session updates an inventory database in /var/lib/xfsdump/inventory. xfsdump uses the inventory to determine the base of incre- mental and resumed dumps. This database can be displayed by invoking xfsdump with the -I option. The display uses tabbed indentation to present the inventory hier- archically. The first level is filesystem. The second level is session. The third level is media stream (currently only one stream is supported). The fourth level lists the media files sequentially composing the stream. FILES
/var/lib/xfsdump/inventory dump inventory database SEE ALSO
xfsdump(8), xfsrestore(8). xfsinvutil(8)
All times are GMT -4. The time now is 06:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy