Search Results

Search: Posts Made By: hemalathak10
1,555
Posted By hemalathak10
Global variables in perl
hi all,

i need a help for the following query.
Thanks in advance for your valuable time.

i have a main.pl file which has a global variable declared as below.
our myVar=0;
call first.pl...
4,582
Posted By hemalathak10
Calling a perl script from another script
hi franzpizzo,

thank you for your quick response.

when i replaced return statement with exit
Can't return outside a subroutine at b.pl line 2.
this error is solved now.

but i am not...
4,582
Posted By hemalathak10
Calling a perl script from another script
hi,
i have 2 perl scrips, a.pl and b.pl.
i want to call b.pl from a.pl and once b.pl is executed, would like to return value from b.pl to a.pl.

######## a.pl ##############
$test = `./b.pl 1`;...
1,456
Posted By hemalathak10
Return a hash table from a sub routine
hello,

i am new to scripting and would like to know how to return a hash table from a sub routine.
i tried the following,

my %hash_function = ();
hash_function = &return_hash();
sub...
1,527
Posted By hemalathak10
thank you zedex and bartus11, it works fine now...
thank you zedex and bartus11, it works fine now :):)
1,527
Posted By hemalathak10
when i call this command using from a perl script...
when i call this command using from a perl script

system(perl -pe '$_="11111\n$_" if $.==1;$_.="2222\n3333\n" if $.==6'sample.txt);

i am getting the following errors

Number found where...
1,527
Posted By hemalathak10
Inserting a new line into an already existing file
hello ..

I am new to perl scripting, I have a text file, and would like to insert 3 new lines into the same file at different line numbers using perl scripting. Any Help regarding this will be...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy