I do not know that module you are using but there are several hints for you:
1. If you are learning then you should know that perl is perfect to create hash of hashes of hashes of ...
2. If you use a huge global hash that keeps everything then you never know where the hash is used / updated.
3. Perl is difficult to maintain - this is why Google moved to Python.
4. Telnet is in no way secure.
5. SSH is far superior over telnet.
6. You should never expect that 2nd side (telnet server in that case) returns something you expected. If it does not then your code would hang.
7. Can you set input & output as 1 file? Can you attach then here? It might be that there is some sync issue... and you should include them to get help.
8. You should not use
The array contains multiple elements and you would see reference to the array rather than its content. You might try
or
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Hi,
I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script.
I have a files named in this format... (13 Replies)
Hi Friends
Im so confused with using 'for' loop in ksh. I have a xml like the following:
<serviceProvider>
<serviceProviderID>1</serviceProviderID>
<serviceProviderName>Balesh</serviceProviderName>
<serviceFeeAmount>30.00</serviceFeeAmount>
</serviceProvider>... (2 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
I'm just messing around with bash and trying to learn it because I have a course next semester dealing with OS design where we need to know how to use SSH client and either bash or ksh. I've never done shell scripting before.
I just started today and I was wondering how parsing files... (1 Reply)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Hello guys,
I am a newbie to all of this - I'd like some help with a file I have. It's a ~100mb CSV file with approximately 30 columns.
What I'd like to do is to search through the file and REMOVE any lines with a certain case insensitive string in any of the columns:
So my file looks... (4 Replies)
Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommUseraContriPerl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements(3)NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements - Don't use the comma operator as a statement separator.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Perl's comma statement separator has really low precedence, which leads to code that looks like it's using the comma list element separator
not actually doing so. Conway suggests that the statement separator not be used in order to prevent this situation.
The confusion that the statement separator causes is primarily due to the assignment operators having higher precedence.
For example, trying to combine two arrays into another like this won't work:
@x = @y, @z;
because it is equivalent to
@x = @y;
@z;
Conversely, there are the built-in functions, like "print", that normally force the rest of the statement into list context, but don't when
called like a subroutine.
This is not likely to produce what is intended:
print join q{, }, 2, 3, 5, 7, ": the single-digit primes.
";
The obvious fix is to add parentheses. Placing them like
print join( q{, }, 2, 3, 5, 7 ), ": the single-digit primes.
";
will work, but
print ( join q{, }, 2, 3, 5, 7 ), ": the single-digit primes.
";
will not, because it is equivalent to
print( join q{, }, 2, 3, 5, 7 );
": the single-digit primes.
";
CONFIGURATION
This policy can be configured to allow the last statement in a "map" or "grep" block to be comma separated. This is done via the
"allow_last_statement_to_be_comma_separated_in_map_and_grep" option like so:
[ValuesAndExpressions::ProhibitCommaSeparatedStatements]
allow_last_statement_to_be_comma_separated_in_map_and_grep = 1
With this option off (the default), the following code violates this policy.
%hash = map {$_, 1} @list;
With this option on, this statement is allowed. Even if this option is off, using a fat comma "=>" works, but that forces stringification
on the first value, which may not be what you want.
BUGS
Needs to check for "scalar( something, something )".
AUTHOR
Elliot Shank "<perl@galumph.com>"
COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank.
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.16.3Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements(3)