Sponsored Content
Top Forums Shell Programming and Scripting PERL navigating directories. How do I do it Post 302609253 by ShermW0829 on Monday 19th of March 2012 02:49:44 PM
Old 03-19-2012
PERL navigating directories. How do I do it

I am trying to write a Perl script that lists all the .pm files within c:\perl on a WinXP system. I have Strawberry Perl installed. I know that I can perform the action I want with shell script commands but I just want to perform it with Perl. I have written a Perl script that opens the pwd and lists the files but I haven't figured out how to start from a base directory and navigate that complex directory returning searched for file names.

Thanks in advance;

Sherman

---------- Post updated at 12:49 PM ---------- Previous update was at 11:28 AM ----------

I think I found the answer in the Perl for System Administration book under Walking or Trans versing the File System. If this is not it then please let me know
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to change working directories in perl?

i am new to perl. i am writing a perl script. i want to know how to change the working directories? for ex. i have a perl script in c:\proj\ . i want to run this script in this directory but i need my script to change its working directory to D:\xyz\ dynamically in the script. your help is... (1 Reply)
Discussion started by: megastar
1 Replies

2. UNIX for Dummies Questions & Answers

Unix - Navigating the file system

When I log on to my unix session I have a default location. But I need to navigate 3 directories up then 6 directories down to where I want to be. There must be a way to create some sort of short cut from my defeault location to my required location. Can anyone help? (4 Replies)
Discussion started by: jjaggii
4 Replies

3. Shell Programming and Scripting

navigating a web interface with a shell script

I'm trying to design a script that will check the external ip address of my home network and then assign it to the A record of a subdomain. When i started, i thought i could do this with SSH, but turns out I don't have ssh access to update the DNS record (not surprising i suppose) So now, i... (2 Replies)
Discussion started by: boyincity
2 Replies

4. Shell Programming and Scripting

List of directories with a particular name using perl

Hi experts, Sorry if it is repeated query. I have folder that contains many files & folders. But I need to get the list of folders with the following format "1.0.0.0.003X", 1.0.0.0.004X..and so on. How do I get the same using perl? I have this script which will do the listing. $dir... (1 Reply)
Discussion started by: amvarma77
1 Replies

5. 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

6. Shell Programming and Scripting

Navigating a WebPage with Perl

Hi All Below is Code, It opens a link from which it ask a login name and password, the script enter the login name and password and navigate to next page.. In the next page there is a drop down box from which i have to select a value, I have written the code but it gives error #!/usr/bin/perl... (3 Replies)
Discussion started by: parthmittal2007
3 Replies

7. UNIX for Dummies Questions & Answers

Navigating directories with * / . and ..

I would be very happy (after a lot of fruitless searching) if someone could explain the meaning of these variations on the ls command: ls */ ls */. ls */./ I understand the basic use of ls already eg ls -al but am wanting to list from different points in the file structure without having to... (4 Replies)
Discussion started by: bloodrule
4 Replies

8. Shell Programming and Scripting

Executing perl files in many directories.

Good morning! I need your help again. I have some perl file. This file, to work, needs to be executed in appropriate directory, e.g. /mnt/disck/new files/abc/003 I need a shell script which: 1) will go to /mnt/disk2/new files/abc/003/perl.pl 2) execute it 3) go to the next directory... (7 Replies)
Discussion started by: ramirez987
7 Replies

9. UNIX for Beginners Questions & Answers

Issue navigating GNU Info nodes

Hello... and thanks in advance for in help anyone can offer me I'm poking around the GNU Info command... It's a lot different from man pages (Including holding much more information) but I'm having issues navigating it... And it's frustrating the hell out of me! My problem is when I go to... (1 Reply)
Discussion started by: bodisha
1 Replies
INN::Config(3pm)					    InterNetNews Documentation						  INN::Config(3pm)

NAME
Config.pm - Export all the variables an INN Perl script might need DESCRIPTION
This Perl module sets up any and all the variables that an INN Perl script might need. More particularly, it allows to use inn.conf variables: they are all provided by innconfval, as well as the version of INN (in the variable $INN::Config::version). Other useful variables are also provided (directories, files, programs, masks, parameters) and you should have a look at the source code of the module to see what you can use in your Perl scripts. You only have to declare the module at the beginning of them: use lib '<pathnews>/lib/perl'; use INN::Config; Then, you can for instance use: print $INN::Config::localmaxartsize; to print the value of localmaxartsize as it is set in inn.conf. You can also specify a version when you import the module. If you write: use INN::Config 2.5.0; only versions of INN superior to 2.5.0 will be able to run the Perl script. It is also possible to import the variables directly in your namespace if you specify what you want to import: use INN::Config qw($localmaxartsize $pathbin); Note that a legacy innshellvars.pl is also provided in pathnews/lib for compatibility reasons with old Perl scripts not shipped with INN. It was used by versions of INN anterior to 2.5.0. The corresponding scripts for Shell and Tcl are, however, still in use: innshellvars and innshellvars.tcl. They offer the same capabilities as this module. HISTORY
innshellvars.pl was written by James Brister <brister@vix.com> for InterNetNews in 1996. It was converted to the INN::Config Perl module by Julien Elie in 2007. $Id: Config.pm.in 8357 2009-02-27 17:56:00Z iulius $ SEE ALSO
inn.conf(5), innconfval(1), perl(1). INN 2.5.2 2009-05-21 INN::Config(3pm)
All times are GMT -4. The time now is 01:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy