perl regexp error , I cant understand what is wrong
Hello all
I have simple perl regexp that is searching for pattern in string and replace it with the same string + addition string
here is what I have :
my $rec = q| new Array("Attributes Management" ... (4 Replies)
I'm Using this script to find the time of a file. I'm very much new to PERL
and found this script posted by some one on this forum.
It runs perfectly fine, just that it gives me following errors with the
accurate output as well. I jus want the output to be stored in another file
so that i can... (0 Replies)
Hello,
after upgrading the memory to 96GB & 6 Dual Processor for P 550 ( and still not applied the parameters which some experienced posters said in post https://www.unix.com/aix/141835-oracle-database-running-slow-aix-nmon-topas-6.html )
I am getting system dumps. How to understand and... (1 Reply)
I'm just trying to confirm that I understand someone's code correctly.
If someone has code that says:
$foo ||= mysub();
I'm assuming that it means if $foo is nothing or undef, then assign it some value via mysub(). If I'm wrong on this, please let me know.
Also, what's the difference... (4 Replies)
#!/usr/bin/perl
use strict;
use warnings;
print "Demo of array slicing \n";
my @abc="a b c d e f g h i j k l m n o p q r s t u v w x y z";
my @a=@abc;
my @random=@abc;
my @comp=@abc;
my @comp1=(@abc,"Hello",@abc);
print "abc is @abc \n";
print "a is @a \n";
print "random is @random \n";... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am trying to convert a C language program over to Sparc Assembley and I am getting Undefined first referenced... (4 Replies)
I have this peice of code I was hoping someone could look at. I use valgrind ./a.out to test it and it comes up with errors but none that I can understand.
Maybe someone here could help me.
The code is here:
Neo - Pastbin Link Removed - Do Not Use Pastebin in these Forums (12 Replies)
I am writing a program, and want to have the option for the program to
continue execution even should things go wrong. I use an option --ignore-errors.
The problem is what I do when an error occurs, set the values to zero, or fill them up with some values, for example taken from a simple unit... (3 Replies)
I am trying to begin to troubleshoot this perl error that I keep getting, yet I get output is produced. The error is Use of uninitialized value in join or string line 175, <MANNO> line 7138 and below is line 175:
I am not too sure what the error is but since not every line has an error on it, I... (1 Reply)
I have a file with two line, one is header, the other actual value:
TYPCD|ETID2|ETID|LEG ID|PTYP|PTYP SUB|TRD STATUS|CXL REASON|CACT|CACTNM|ENCD|ENC
D NM|TRDR|ASDT|TRDT|MTDT|STDT|LS|SECID|SECID TYP|SECNM|PAR|STCC|MARKET PRICE|DIS
MARKET PRICE|MARKET PRICE CURRENCY|SRC OF SETTLEMENT... (2 Replies)
Perl::Critic::Policy::ControlStructures::ProhibitCascadiUserEContributed PerlPerl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse(3pm)NAME
Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse - Don't write long "if-elsif-elsif-elsif-elsif...else" chains.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Long "if-elsif" chains are hard to digest, especially if they are longer than a single page or screen. If testing for equality, use a hash
lookup instead. If you're using perl 5.10 or later, use "given"/"when".
if ($condition1) { #ok
$foo = 1;
}
elsif ($condition2) { #ok
$foo = 2;
}
elsif ($condition3) { #ok
$foo = 3;
}
elsif ($condition4) { #too many!
$foo = 4;
}
else { #ok
$foo = $default;
}
CONFIGURATION
This policy can be configured with a maximum number of "elsif" alternatives to allow. The default is 2. This can be specified via a
"max_elsif" item in the .perlcriticrc file:
[ControlStructures::ProhibitCascadingIfElse]
max_elsif = 3
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.14.22012-06-0Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse(3pm)