10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI I ma using perl programming
my perl is like this
$InputFile = $ENV{UDE_TMP} . "/" ."cre_fmr_gen.temp_data_file_gen.dat";
@duplicates = `cat $InputFile | cut -d "|" -f 1,1 | sort | uniq -c | awk '{ if(\$1>1) {print \$2;}}'`;
my $cusiplist ;
foreach $cusip (@duplicates)
{... (1 Reply)
Discussion started by: ptappeta
1 Replies
2. Shell Programming and Scripting
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)
Discussion started by: irudayaraj
2 Replies
3. Shell Programming and Scripting
Hi,
i have a txtfile with the format <Nr>tab<word>tab<other stuff>new line and i want to sort the <word>-colum with a perl script.
My textfile:
<Nr>tab<word>tab<other stuff>new line
6807 die ART.Acc.Sg.Fem
6426 der ART.Gen.Sg.Fem
2 die ART.Nom.Sg.Fem
87 auf APPR.--
486 nicht PTKNEG.--... (1 Reply)
Discussion started by: buckelede
1 Replies
4. Shell Programming and Scripting
Hi,
I have a strange problem with arrays in Perl.
That is to say, for me it is strange and perhaps there is a special reason for it that I do not know of.
Not a real Perl Ace.
This is the program, as an example:
#!/usr/bin/perl -w #-d
use strict;
my $pu;
my $pu_list_cmd;
my... (2 Replies)
Discussion started by: ejdv
2 Replies
5. Shell Programming and Scripting
I have a array reference which has some number of array references inside it.The nested array references also contains the array references.
my $Filename = "sample.xml";
my $Parser = new XML::Parser( Style => 'tree' );
my $Tree = $Parser->parsefile( $Filename );
Here the $Tree is the... (6 Replies)
Discussion started by: karthigayan
6 Replies
6. Shell Programming and Scripting
Hi All
I want to search a string from an array in Perl. If a match occurs, assign that string to a variable else assign 'No match'. I tried writing the script as follows but it's in vain. Please help me..
#!/usr/bin/perl
use strict;
my $NER;
my @text=("ORG","PER");
... (4 Replies)
Discussion started by: my_Perl
4 Replies
7. Shell Programming and Scripting
I have a few .tex files generated with html2latex. They have some extra \\ that generate error with pdflatex, so I would like to get rid of them.
This
perl -p -i -e s/\\\\//g myfile.tex
with or without simple or double quote remove all of the backslashes, also the single ones needed by tex.
How... (2 Replies)
Discussion started by: ahsog
2 Replies
8. Shell Programming and Scripting
$key = "a";
$value = "hello";
%myhash = {} ;
push @{ myHash{$key} }, $hello;
print $myHash{$key}."\n";
this script prints
"hello" but has following error message.
Reference found where even-sized list expected at ./test line 5.
can any one help me to fix this problem?? (3 Replies)
Discussion started by: bonosungho
3 Replies
9. Shell Programming and Scripting
I come across the problems when assigning the array in the script below . How to use the array with the 'string index' correctly ? When I assign a new string index , the array elements that are previously assigned are all changed .:eek::eek::eek:
$ array=211
$ echo ${array}
211
$... (4 Replies)
Discussion started by: youareapkman
4 Replies
10. Shell Programming and Scripting
Looking for a bit of help. I need to search for a string of words, but unfortunately these words are located on separate lines.
for example the text output is:
United
Chanmpions
Ronaldo
Liverpool
Losers
Torres
and my script code is
print("DEBUG - checking file message");
while... (15 Replies)
Discussion started by: meevagh
15 Replies