10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
sub uniq {
my %h;
return grep { !$h{$_}++ } @_
}
The above code is to remove duplicates from array.
I am having hard time understanding below things (basically around highlighted code in bold)-
when was the value inserted in hash?
and are we only adding a key in Hash not... (1 Reply)
Discussion started by: Tanu
1 Replies
2. UNIX for Dummies Questions & Answers
Query with perl syntax
Aim: is to change a perl script to use a new file
I was required to replace
- entries \"$entries\"
with
-lib <full_path_to_filename>
So in the code detector.pm
sub rundetector
{
my $class = shift;
mkdir($resultDirectory);
my... (3 Replies)
Discussion started by: sa@@
3 Replies
3. Shell Programming and Scripting
I'm a newbie to perl scripting. Can someone please explain the syntax below. Specifically what does -> and => do?
$tz->site( => $site); (10 Replies)
Discussion started by: scj2012
10 Replies
4. Shell Programming and Scripting
I am using this line of perl code to change the file format and remove ^M at the end of each line in files:
perl -i -pe's/\r$//;' <name of file here>
Can you explain to me what this code does, and translate it into bash/awk/sed? (2 Replies)
Discussion started by: locoroco
2 Replies
5. UNIX for Dummies Questions & Answers
Could you please tell the meaning of Below mentioned perl script lines:
format OWNER_TOTAL =
@< Owner Code @<<<<<<total: @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @######
#.##
$prev_cust_type, $prev_owner_code,... (2 Replies)
Discussion started by: vinothrajan55
2 Replies
6. Shell Programming and Scripting
Can someone please explain what tr#A-Za-z0-9+/# -_#; means in perl? (4 Replies)
Discussion started by: 3junior
4 Replies
7. Shell Programming and Scripting
Im new at scripting and im trying to write a script using perl that will make sure there are 2 command line integer arguments and then check if the 2nd argument is greater than the first. i believe im close but still receive my error message even when i have 2 arguments and the second part gives me... (6 Replies)
Discussion started by: livewire06
6 Replies
8. Shell Programming and Scripting
Thanks to this forum I have managed to work out a solution to my problem and actually understand most of it, but one thing is confusing me and I am sure someone here can explain.
I need to insert a piece of txt into a file. This txt is
awk '{ sub(/$/,"\r"); print }' $JCL_WBB50103_EFTOUT >... (2 Replies)
Discussion started by: hukcjv
2 Replies
9. Shell Programming and Scripting
This is taken from perlop. I can't understand what's going on, please can someone explain this for me?
$hexdigit = (0 .. 9, 'a' .. 'f');
to get a hexadecimal digit (2 Replies)
Discussion started by: ksheller
2 Replies
10. Shell Programming and Scripting
hi all
i wrote a shell script which uses perl script my code is :
>cat filename | while read i
>do
>perl -e 'require "/home/scripts/abc.pl" ; abc("$i")'
>done
perl script used will simply check syntax of Cobol programs but it didn't work for me so i asked my colleague he suggested... (1 Reply)
Discussion started by: zedex
1 Replies