03-31-2008
Quote:
Originally Posted by
KevinADC
Tie::File has been a core module for a while, but I am not sure since when. The problem is that your server is using a very old version of perl 5.005, so either it was not included with the distribution of perl you have or it was removed for some reason.
Thanks Kevin.
I read your previous article how to fix the problem on the module issue
Perl - read a line from a file and writing to the same line in the file
But still getting the error....
Anyway many many thanks for your time and given code. I'll try it.
Regards,
prady
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I'm not very good with the serach patterns and I'd need a sample how to find a line that has multiple patterns.
Say I want to find a line that has "abd", "123" and "QWERTY" and there can be any characters or numbers between the serach patterns, I have a file that has thousands of lines and... (10 Replies)
Discussion started by: Juha
10 Replies
2. Shell Programming and Scripting
Help with script that will check log, then find a match is found, add that as the subject line.
1. The script will always run as a deamon.. and scan the event.log file
2. when a new 101 line is added to the event.log file, have the script check position 5,6 and 7 which is the job name, which... (2 Replies)
Discussion started by: axdelg
2 Replies
3. UNIX for Dummies Questions & Answers
Hello, can someone help me how to find a word and 2 lines after it and then send the output to another file.
For example, here is myfile1.txt. I want to search for "Error" and 2 lines below it and send it to myfile2.txt
I tried with grep -A but it's not supported on my system.
I tried with awk,... (4 Replies)
Discussion started by: eurouno
4 Replies
4. UNIX for Dummies Questions & Answers
I have a file like this
DoctorName
Address1
Address2
DOB
InsuredName
Address1
Address2
DOB
PatientName
Address1
Address2
DOB
ClaimNo1
DoctorName
Address1
Address2
DOB
InsuredName (2 Replies)
Discussion started by: nsuresh316
2 Replies
5. Shell Programming and Scripting
Hi All,
From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able
to print text before the pattern. it display texts which is found after pattern.
awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//'
input... (4 Replies)
Discussion started by: Optimus81
4 Replies
6. Shell Programming and Scripting
Hello Everyone,
I have a file with 5 fields in each line just like mentioned below. Also the 4th field is time elapsed(hh:mm:ss) since the process is running
xyz abc status 23:00:00 idle
abc def status 24:00:00 idle
def gji status 27:00:02 idle
fgh gty status 00:00:00 idle
Here I... (8 Replies)
Discussion started by: rahul2662
8 Replies
7. Shell Programming and Scripting
Hi,
I have log like this:
... (1 Reply)
Discussion started by: justbow
1 Replies
8. Shell Programming and Scripting
Hi,
I have log like this:
... (1 Reply)
Discussion started by: justbow
1 Replies
9. Shell Programming and Scripting
Hi All,
totally new on it , normally use it for just 1 line.
i'm looking for help.
i'm have 2 file.
file 1 :
--------------------------------------------------
c12
c1
c3
--------------------------------------------------
file 2:
other content ... (10 Replies)
Discussion started by: kttan
10 Replies
10. UNIX for Beginners Questions & Answers
Looking for help,
i have input file like below and want to modify to expected output, if can without create additional file, hope can direct modify it.
have 2 thing need do.
1st
is adding a word (testplan generation off) after ! ! IPG: Tue Aug 07 14:31:17 2018
2nd
is adding... (16 Replies)
Discussion started by: kttan
16 Replies
LEARN ABOUT CENTOS
task::weaken
Task::Weaken(3) User Contributed Perl Documentation Task::Weaken(3)
NAME
Task::Weaken - Ensure that a platform has weaken support
DESCRIPTION
One recurring problem in modules that use Scalar::Util's "weaken" function is that it is not present in the pure-perl variant.
While this isn't necesarily always a problem in a straight CPAN-based Perl environment, some operating system distributions only include
the pure-Perl versions, don't include the XS version, and so weaken is then "missing" from the platform, despite passing a dependency on
Scalar::Util successfully.
Most notably this is RedHat Linux at time of writing, but other come and go and do the same thing, hence "recurring problem".
The normal solution is to manually write tests in each distribution to ensure that "weaken" is available.
This restores the functionality testing to a dependency you do once in your Makefile.PL, rather than something you have to write extra
tests for each time you write a module.
It should also help make the package auto-generators for the various operating systems play more nicely, because it introduces a dependency
that they have to have a proper weaken in order to work.
How this Task works
Part of the problem seems to stem from the fact that some distributions continue to include modules even if they fail some of their tests.
To get around that for this module, it will do a few dirty tricks.
If Scalar::Util is not available at all, it will issue a normal dependency on the module. However, if Scalar::Util is relatively new ( it
is >= 1.19 ) and the module does not have weaken, the install will bail out altogether with a long error encouraging the user to seek
support from their vendor (this problem happens most often in vendor-packaged Perl versions).
This distribution also contains tests to ensure that weaken is available using more normal methods.
So if your module uses "weaken", you can just add the following to your Module::Install-based Makefile.PL (or equivalent).
requires 'Task::Weaken' => 0;
SUPPORT
Bugs should be always be reported via the CPAN bug tracker at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Task-Weaken>
For other issues,contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
Task, Scalar::Util, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2011-03-08 Task::Weaken(3)