if($line =~ /^.*:agent_id=>(.+?),/){ # Calls count based on call type
my $agent_value=$1;
my $agent_value=~s/\"//g;
push @agent_ids, $agent_value;
print Dumper\@agent_ids;
}
Before while loop I have declared the @agent_ids and then added the push function with array and scalar variable.
While printing the @agent_ids variable it printed the undef in array.
I don't know why it is printing the undef values instead of exact values.
-
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.
|