01-18-2009
Check the File::ReadBackwards module (you have to install it manually, it's not included in the standard distribution).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am opening a file......then i am wrting some data into it......and i am reopening the file again but ......i get a error cannot open file.......
$::file= "\adder\testfile.txt"
open(TEST1,$::file);
some write operation
close(TEST1)
open(TEST1,$::file) 'I GET A ERROR CAN OPEN... (2 Replies)
Discussion started by: vivekshankar
2 Replies
2. Shell Programming and Scripting
Guys,
I'm doing signal handling in Perl. I'm trying to catch ^C signal inside the script.
There two scripts : one shell script and one perl script.
The shell script calls the perl script.
For e.g. shell script a.sh and perl scipt sig.pl.
Shell script a.sh looks something like this :... (6 Replies)
Discussion started by: obelix
6 Replies
3. Programming
Hi there,
I'm newby in perl and XML. I can read and parse Xml with XML-Node upper XML::Parser, but how can I create XML tags and pack my individual data in it then send through socket. PLZ lead me :)
Thanks in Advance. (1 Reply)
Discussion started by: Zaxon
1 Replies
4. Shell Programming and Scripting
Hi ,
Is there any way to achieve following using perl program (i.e without using system command).
1.system ("echo 'test' > /usr/spool/ship.csv");
2.system ("cat /usr/ajay_test* >> /usr/spool/RAM/work/patil.csv");
3.system("> /usr/spool/ajay.txt");
e.g
for system("rm -f... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies
5. Shell Programming and Scripting
Hello all,
I have created a Perl script that tries to open connections to various systems on different ports in order to see if the machines are reachable, the ports are open, etc.
There appears to be a difference between Solaris (10) and Linux (RH/Oracle and Ubuntu) in the status or error it... (4 Replies)
Discussion started by: Hollinch
4 Replies
6. Shell Programming and Scripting
Hi All,
I'm pretty new to the forum and also to UNIX. I have a requirement for which I need some help. I have a script (example.script) where I get user inputs using the read command. I would need to pass the read-fetched input to a perl command (explained below) in my script. The part which... (3 Replies)
Discussion started by: bharath.gct
3 Replies
7. Programming
$# some text
$$ some text
$@ some text
$$. some text
Mg1 some text
Mg2 some text
.
.
.
Mg10 some text
The above 10 lines are to be extracted except the lines starting from $#,$$.,... (4 Replies)
Discussion started by: baig.abdul
4 Replies
8. Shell Programming and Scripting
I have a PERL command line embedded in a UNIX script. The script doesn't handle errors coming out of this command. I'm processing large files and occassionally I run out of disk space and end up with half a file.
perl -p -e 's/\n/\r\n/g' < TR_TMP_$4 > $4
How do I handle errors coming out... (1 Reply)
Discussion started by: OTChancy
1 Replies
9. Shell Programming and Scripting
Hi,
I am reading and file and writting each word to other file.
where I have used array to store the data.
I am getting below error as
"Use of uninitialized value in concatenation (.) or string at customize_split_raw.pl line 51, <IN_FILE> "
Where my line 51 code is
50 foreach... (8 Replies)
Discussion started by: Beginer123
8 Replies
10. Shell Programming and Scripting
Hi,
I have a perl script which is just reading from the file but what I would like to understand is how the counter is moving without using the loop in the script.
Below are the details:
$ more /tmp/abc.txt
This is 0
This is 1
This is 2
This is 3
This is 4
This is 5
This is 6
This... (2 Replies)
Discussion started by: siddharthjindal
2 Replies
LEARN ABOUT DEBIAN
file::sharedir::install
File::ShareDir::Install(3pm) User Contributed Perl Documentation File::ShareDir::Install(3pm)
NAME
File::ShareDir::Install - Install shared files
SYNOPSIS
use ExtUtils::MakeMaker;
use File::ShareDir::Install;
install_share 'share';
install_share dist => 'dist-share';
install_share module => 'My::Module' => 'other-share';
WriteMakefile( ... ); # As you normaly would
package MY;
use File::ShareDir::Install qw(postamble);
DESCRIPTION
File::ShareDir::Install allows you to install read-only data files from a distribution. It is a companion module to File::ShareDir, which
allows you to locate these files after installation.
It is a port Module::Install::Share to ExtUtils::MakeMaker with the improvement of only installing the files you want; ".svn" and other
source-control junk will be ignored.
EXPORT
install_share
install_share $dir;
install_share dist => $dir;
install_share module => $module, $dir;
Causes all the files in $dir and its sub-directories. to be installed into a per-dist or per-module share directory. Must be called
before WriteMakefile.
The first 2 forms are equivalent.
The files will be installed when you run "make install".
To locate the files after installation so they can be used inside your module, see File::ShareDir.
my $dir = File::ShareDir::module_dir( $module );
Note that if you make multiple calls to "install_share" on different directories that contain the same filenames, the last of these calls
takes precedence. In other words, if you do:
install_share 'share1';
install_share 'share2';
And both "share1" and "share2" contain a fill called "info", the file "share2/info" will be installed into your "dist_dir()".
postamble
Exported into the MY package. Only documented here if you need to write your own postable.
package MY;
use File::ShareDir::Install;
sub postamble {
my $self = shift;
my @ret = File::ShareDir::Install::postamble( $self );
# ... add more things to @ret;
return join "
", @ret;
}
SEE ALSO
File::ShareDir, Module::Install.
AUTHOR
Philip Gwyn, <gwyn-AT-cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2009-2011 by Philip Gwyn
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
perl v5.12.4 2011-08-26 File::ShareDir::Install(3pm)