10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all .
my %result (
$abc => {
'data_count' => '10',
'ID' => 'ABC122',
}
$def => {
'data_count' => '20',
'ID' => 'defASe',
... (1 Reply)
Discussion started by: asak
1 Replies
2. Shell Programming and Scripting
Hi All
I have a doubt and want to be cleared I am using
@array = (10, 20);
$rarray = \@array;
#print "$rarray\n";
#print "@$rarray\n";
$rr= \$array;
#print $$rr;
$rr++;
print $$rr;
As you can see the $rr contains the reference to the first element of the array , now as the... (5 Replies)
Discussion started by: parthmittal2007
5 Replies
3. Shell Programming and Scripting
Hi,
In Perl, is it possible to use a range of numbers with '..' as a key in a hash?
Something in like:
%hash = (
'768..1536' => '1G',
'1537..2560' => '2G'
);
That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Discussion started by: dsw
3 Replies
4. UNIX for Advanced & Expert Users
Hi Everyone,
Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below
i have defined two Hash %lc and %tab as below
$lc{'REFF'}='V_RES_CLASS';
$lc{'CALE'}='V_CAP_CLASS';
$lc{'XRPD'}='V_XFMR_CLASS';
$tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
Discussion started by: jam_prasanna
6 Replies
5. Shell Programming and Scripting
Can someone explain where can we actually used
print $var->;
or
print $$var
When does the -> becomes necessary and when its optional. (1 Reply)
Discussion started by: dinjo_jo
1 Replies
6. Shell Programming and Scripting
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
Discussion started by: jgfcoimbra
1 Replies
7. Shell Programming and Scripting
I have a script (say script1.sh ) and I am calling a script (say script2.sh) within the script1.sh. Here in script1.sh I have a hash ( say %hash1) and i have to pass this hash to script2.sh. Basically i have to do some processing in Scirpt2.sh based on the hash(key,values). I wanted to know how can... (2 Replies)
Discussion started by: ammu
2 Replies
8. Shell Programming and Scripting
Hi,
I have a function that hold 3 arrayies.
I need to pass them to another function as an input, for further use
Could you please explain how to do that.
Thanks (5 Replies)
Discussion started by: yoavbe
5 Replies
9. Shell Programming and Scripting
All,
I have a sh script of the following tune:
function a () { #functionality.. }
function b () { #functionnlity.. }
function check () { # this function checks for env and if all fine call build }
function usage () { #sh usage details }
function build () { #calls either a or b or... (5 Replies)
Discussion started by: vino
5 Replies
10. UNIX for Dummies Questions & Answers
Hi:
How do I pass a hash table down to a subroutine along with some other variables?
For example, I have say a subroutine play_with_hash:
sub play_with_hash
{
my( $var1, $var2, %my_hash ) = @_;
#do stuff with %my_hash
...........
}
Then I want to call the subroutine... (1 Reply)
Discussion started by: mirzabhai
1 Replies