prolly not.
== turn an alphanumeric string (if that is something you know) into '-_' where _
is a reserved word in perl regex that means a word separator. i.e., replace alphanum words
witj the hyphen
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)
@sorted = sort { $a <=> $b } @unsorted;
I am having hard time understanding how this works? I know the output but interested to know the working.
Thanks in advance. (2 Replies)
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)
I have seen something like this in a perl code:
$_ =~ s/__FD_PRN_/\\(/g
What does this "__FD_PRN_" means. I have searched google but was not able to find any info regarding this. Appreciate if some one can refer to a link for these characters. From comments/code it used to substitue "(" with... (3 Replies)
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)
hi all
i was going through some perl code i came across this line and i am not getting what is exactly going on ..
$$this{localtion} = GetName->GetVarName("EXE_DIR") ;
what is the red part doing in above code (2 Replies)
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)