Hello:
I have the following perl script which is giving me trouble inside the second elsif statement. The purpose of the script is to go through a file and print out only those lines which contain pertinent information. The tricky part came when I realized that certain items actually spanned two or three lines. (For example, "FUNCTION:" information in the sample file).
The elsif condition is intended to recognize the beginning of the desired information (which it does) and the until condition is intended to recognize the end of the desired information. Strangely, the script appears to loop through the until construct the appropriate number of times, but it prints the initial line every time instead of the successive line. I suspect I'm using the diamond operator incorrectly.
Here is a sample of the file. :
For what it's worth, I can get it working perfectly using the code below inside the elsif. I'm just curious why my initial attempt is failing. (Note: This second example has a regEx inside the until construct, but that shouldn't make the difference).
When reading over some perl code in a software document, I came across an assignment statement like this
$PATH = ${PROJECT}/......./....
In this particular form of scalar variable assignment, what does the curly braces operators do ? Also, what is the benefit in doing scalar assignment this... (3 Replies)
I am sure there should exist a chomp like Perl operator in Bash using which I can literally remove new line characters as show below:
Any clue? (3 Replies)
Hi,
I have a variable, $sername, and I would like to display this variable only if it *does not* contain either of these two tags: *DTI*FA* or *DIFF*FA*.
I think the syntax for my 'or' operator is off. The variable $sername is continuously changing in an outer loop (not shown), but at the... (4 Replies)
I know that when using 'while (<FILE>) {}', Perl reads only one line of the file at one time, and store it in '$_'.
Can I change some parameters so that 'while (<>) {}' can read more than one lines, like 2 or 5 lines at one time?
Thanks for the help! (1 Reply)
Hi
What is the syntax for if statement using && and || operator?
if && ] ||
here its giving me an error to this if statement
any suggestion?? (2 Replies)
Hi,
I was hoping someone could explain this please :)
I'm using bash, scientific linux... and I don't know what else you need to know. With
awk '{ if( 0.3 == 0.1*3) print $1}' file.dat
nothing will be printed since apparently the two numbers do not equate. (Using 0.3 != 0.1*3 is seen... (4 Replies)
Hey guys,
This is purely just a little bit of fun with awk. I realize this this isn't that constructive so please remove if need be.
Your goal:
Create a one line awk script that generates a diamond shape of any
size. Both the size of the diamond (measured by its middle line) and
the... (7 Replies)
how can i use like operator in IF statement. Below is correct format, please guide
if ; then
CT_ACT_FILE_NAME=`echo FINACLE'
else
CT_ACT_FILE_NAME=`echo not listed'
fi
---------- Post updated at 04:58 PM ---------- Previous update was at 04:56 PM ----------
Please use CODE... (6 Replies)
I have to print the number of stars that increases on each line from the minimum number until it reaches the maximum number, and then decreases until it goes back to the minimum number. After printing out the lines of stars, it should also print the total number of stars printed.
I have tried... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
LEARN ABOUT CENTOS
ppi::statement::end
PPI::Statement::End(3) User Contributed Perl Documentation PPI::Statement::End(3)NAME
PPI::Statement::End - Content after the __END__ of a module
SYNOPSIS
# This is normal content
__END__
This is part of an PPI::Statement::End statement
=pod
This is not part of the ::End statement, it's POD
=cut
This is another PPI::Statement::End statement
INHERITANCE
PPI::Statement::End
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
"PPI::Statement::End" is a utility class designed to serve as a contained for all of the content after the __END__ tag in a file.
It doesn't cover the ENTIRE of the __END__ section, and can be interspersed with PPI::Token::Pod tokens.
METHODS
"PPI::Statement::End" has no additional methods beyond the default ones provided by PPI::Statement, PPI::Node and PPI::Element.
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 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-02-26 PPI::Statement::End(3)