I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Hi,
can I use array elements ( all ) in conditional statements?
the problem is ,the total number of elements is not known.
e.g
A is an array with elements - 1,2,3
now if i want to test if the 1 st field of input record is either 1,2 or 3, i can do something like this
if ( $1 ~... (1 Reply)
Hi,
Is there any way I can grep an array against another array?
Basically here's what I need to do.
There will be an array containing some fixed texts and I have to check whether some files contain these lines. Reading the same files over and over again for each different pattern doesnt seem... (1 Reply)
Hi,
I want to check a particular string inserted by User to be checked against the values i already have in a ARRAY string using IF condition. Is this possible? if yes how to do that.
example :
i have a,b,c,d,e,f values in a array called values
i asked user to enter a value:
user entered... (2 Replies)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi everyone
I have one question about using array in perl. let say I have several log file in one folder.. example
test1.log
test2.log
test3.log
and the list goes on..
how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
I want to build an Errorlog. I would like to build an array as I move through the if statements and print the array once all error conditions have been defined. The results need to be comma delimited.
tsver will be static "1.9.6(2)"
other vars $prit $lt $rt can have the same or a different... (1 Reply)
hi,
say if my array has the following integer values.array=( 5 10 15 20 )and A assigns to 5.A=5How do I if condition to check against if value A is in this array or not, in shell script?
thx (5 Replies)
Discussion started by: martin5kh
5 Replies
LEARN ABOUT REDHAT
perldelta
PERLDELTA(1) Perl Programmers Reference Guide PERLDELTA(1)NAME
perldelta - what is new for perl v5.8.1
DESCRIPTION
This document describes differences between the 5.8.0 release and the 5.8.1 release.
Incompatible ChangesCore Enhancements
Tied Arrays with Negative Array Indices
Formerly, the indices passed to "FETCH", "STORE", "EXISTS", and "DELETE" methods in tied array class were always non-negative. If the
actual argument was negative, Perl would call FETCHSIZE implicitly and add the result to the index before passing the result to the tied
array method. This behavior is now optional. If the tied array class contains a package variable named $NEGATIVE_INDICES which is set to
a true value, negative values will be passed to "FETCH", "STORE", "EXISTS", and "DELETE" unchanged.
Warnings
Perl 5.8.0 forgot to add some deprecation warnings. These warnings have now been added.
Pseudo-hashes really are deprecated
Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in Perl 5.10.0, see perl58delta for details. Each attempt to access
pseudo-hashes will trigger the warning "Pseudo-hashes are deprecated". If you really want to continue using pseudo-hashes but not to see
the deprecation warnings, add:
no warnings 'deprecated';
5.005-style threads really are deprecated
5.005-style threads (activated by "use Thread;") were deprecated in Perl 5.8.0 and will be removed in Perl 5.10.0, see perl58delta for
details. Each attempt to create a 5.005-style thread will trigger the warning "5.005 threads are deprecated". If you really want to con-
tinue using 5.005 threads but not to see the deprecation warnings, add:
no warnings 'deprecated';
Modules and PragmataUtility ChangesNew DocumentationPerformance EnhancementsInstallation and Configuration ImprovementsSelected Bug FixesNew or Changed DiagnosticsChanged InternalsNew TestsKnown ProblemsPlatform Specific ProblemsReporting Bugs
If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug
database at http://bugs.perl.org/ . There may also be information at http://www.perl.com/ , the Perl Home Page.
If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a
tiny but sufficient test case. Your bug report, along with the output of "perl -V", will be sent off to perlbug@perl.org to be analysed by
the Perl porting team.
SEE ALSO
The Changes file for exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.
perl v5.8.0 2003-02-18 PERLDELTA(1)