Since I'm dumping $inc1 .... $inc12 to a text file, they values are read. Additional to these I've another function that reads data from a file and stores it in a array. After storing in array I'm printing these array. Here comes the problem, script is not printing.
Code I'm using to create a array is:
while (<$infile_lib1>)
{
if ($_ =~ /values \( \/ /)
{
$line = <$infile_lib1>;
@DIN_SETUP_RISE_1 = split /,/,$line;
print "@DIN_SETUP_RISE_1 \n";
$line = <$infile_lib1>;
@DIN_SETUP_RISE_2 = split /,/,$line;
print "@DIN_SETUP_RISE_2 \n";
$line = <$infile_lib1>;
@DIN_SETUP_RISE_3 = split /,/,$line;
print "@DIN_SETUP_RISE_3 \n";
}
}
Input file have these values:
values ( \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
"0.1234567, 0.2345678, 0.3456789, 0.4567891, 0.56789123, 0
+.67891234, 0.78912345", \
);
Some how I'm not able to create an list of array for each line read, split and assign to array. Perl does not report any error when I execute code, and array is not getting print. I've used all debug tools available, like strict, warnings, diagnostic...please help!!
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.