Sponsored Content
Top Forums Shell Programming and Scripting perl package directories - what if the script is diff DIR to the one contain *.pm? Post 58554 by cbkihong on Tuesday 23rd of November 2004 07:32:07 PM
Old 11-23-2004
Two ways.

Just amend the include path at the top of your script, i.e. @INC

e.g.

Code:
@INC = ('..', @INC);

Maybe to cause it to take effect early (before execution) by

Code:
BEGIN {
	@INC = ('..', @INC);
}

which is essentially the same as the Perl pragma "use lib" :

e.g.

Code:
use lib '..';

More information:
http://theoryx5.uwinnipeg.ca/CPAN/perl/lib/lib.html
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

perform diff between 2 directories

Hello all i wander what is the best way to make diff between 2 directories and perform diff of 2 kinds the first is the names of the files on each directory , and the second diff is between the content of each file and the corresponding file and the second dir. Thanks for the help (5 Replies)
Discussion started by: umen
5 Replies

2. Shell Programming and Scripting

compare 2 coloum of 2 diff files using perl script

Hi, i am new to perl scripting.. i am still learing it.. i am asked to write a perl script which should compare 2 coloums of 2 different files. if those 2 coloumn are same the script should store the both the lines in 2 diff files. these are files, file 1: 21767016 226112 char 19136520... (3 Replies)
Discussion started by: vasuki
3 Replies

3. UNIX for Dummies Questions & Answers

Using diff on files in different directories

Hi, I want to be able to compare two different files in two different directories. I have a development server set up on one domain and a live server set up on another.....I need to be able to compare files on these two servers. Any ideas? (2 Replies)
Discussion started by: elduderino
2 Replies

4. Shell Programming and Scripting

How to search through directories and sub dir

Im working on a project that basically imitates the find and whereis commands. The program will take in a file name or regular expression and, starting with the current directory search downwards and match any files with that pattern and prints the path name. I don't understand how to do this... (5 Replies)
Discussion started by: new2C
5 Replies

5. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

6. Shell Programming and Scripting

diff script to copy files to other dir when not exists

I have two directories that are mostly the same: dir1 dir2 Is there an easy way to take the output of diff and copy files from dir1 that do not exist in dir2 - but copy them to the same path (many nested directories). am only trying to copy files in dir1 that do not exist in dir2. ... (5 Replies)
Discussion started by: jvsrvcs
5 Replies

7. Shell Programming and Scripting

Perl Script not working on all directories

Hi Folks, I have a script that I am using. The files are in Directory c:\files\change\options In that directory I have many other sub folders like R1 R2 R5 E4 etc... When I run this script in windows, It looks like its just changing the first folder R1 and not the rest. Can I get an... (6 Replies)
Discussion started by: richsark
6 Replies

8. Shell Programming and Scripting

Need a perl script similiar to grep -r 'word' /path/to/dir"

Hi , i am looking for a perl script to grep for a string in all files inside a directory . bash command . grep -r 'word' /path/to/dir Thanks, Nvil (3 Replies)
Discussion started by: nevil
3 Replies

9. Shell Programming and Scripting

Comparision of two directories of diff servers

Hi All, I have transferred some directory structures from server1 to server2 by creating a tar files. Now i need to cross check whether I transferred entire structures or not. Is there any command to check this on each individual server. Thanks (2 Replies)
Discussion started by: nag_sathi
2 Replies

10. Shell Programming and Scripting

Comparing two directories with diff

Hi all, I have 2 directories on two different servers. I am trying to find out what is missing from directory X and what is missing from directory Y. they should both have the same exact files in them. I understand some files may be missing from both directories on each server. I am not sure... (8 Replies)
Discussion started by: jeffs42885
8 Replies
Locale::Codes::LangExt(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangExt(3pm)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangExt(3pm)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy