If you want to get more familiar with perl, in any case it is recommendable to study the man pages (which in case of perl are very instructive), the most basic ones are:
perlrun, perlsyn, perldata, perlop, perlfunc (second level: perlsub, perlre, perlvar)
how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.
rmjoe123@hotmail.com has '@' sign and followed by a '.'
to be more... (1 Reply)
how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.
rmjoe123@hotmail.com has '@' sign and followed by a '.'
to be more... (1 Reply)
Hi all,
Iam a beginer in shell scripting.
i need a script that can parse the arguments and store them in variables.
ex: ./myScript -v v1 -h v2 -c v3......
can someone suggest me...?
tnx in adv. (1 Reply)
Hi,
I have to check whether an argument say $ARGV is not null in an if operator. Please let me know the operator. It would be great if you write a psuedo code.
Thanks in advance
Ammu (4 Replies)
public class HelloWorld {
public static void main(String args) {
System.out.println("Welcome, master");
}
}
and I compiled using
javac HelloWorld.java
]
Suppose that I execute the following command directly from the shell:
java -XX:OnError="gdb - %p" HelloWorld
Then it works... (8 Replies)
i wanna passing an argument which read in a file or a set of files if the files are given in the command line, otherwise use STDIN if no file argument.
i got something like that, but it is not really working.
so can anyone help me? which one is better to use for and how? Use perl.
Thank you
... (0 Replies)
If i have a script name.pl
I run it like name.pl -v file.txt -t ext2 -u user -j
how can I edit the array @ARGV so when my script calls
$ARGV = -v file.txt
$ARGV = -j (2 Replies)
Hi All,
I want to run a bash script using perl. But they are in the different dir.
#! /usr/bin/perl -w
use strict;
my $root=`pwd`;
chomp($root);
my $cmd=".$root/testdir/ft_623.sh 3 4 5 6 7";
print $cmd;
my @line=`$cmd`;
foreach (@line){
print $_;
}
ft_623.sh (0 Replies)
Hello all, I am relatively new to linux and bash scripting. I have what seems to be a simple question but I'm having trouble finding the answer.
The question is what is the difference between the variables $@ and $*. I've seen them both used in the same context, and I've tried a number of... (4 Replies)
Discussion started by: nicthu
4 Replies
LEARN ABOUT DEBIAN
perlindex
PERLINDEX(1p) User Contributed Perl Documentation PERLINDEX(1p)NAME
perlindex - index and query perl manual pages
SYNOPSIS
perlindex -index
perlindex tell me where the flowers are
DESCRIPTION
""perlindex -index"" generates an AnyDBM_File index which can be searched with free text queries ""perlindex" a verbose query".
Each word of the query is searched in the index and a score is generated for each document containing it. Scores for all words are added
and the documents with the highest score are printed. All words are stemed with Porters algorithm (see Text::English) before indexing and
searching happens.
The score is computed as:
$score{$document} += $tf{$word,$document}/$maxtf{$document}
* log ($N/$n{$word});
where
$N is the number of documents in the index,
$n{$word} is the number of documents containing the word,
$tf{$word,$document}
is the number of occurances of word in the document, and
$maxtf{$document}
is the maximum freqency of any word in document.
OPTIONS
All options may be abreviated.
-maxhits maxhits
Maximum numer of hits to display. Default is 15.
-menu
-nomenu Use the matches as menu for calling "man". Default is -menu.q
-cbreak
-nocbreak Switch to cbreak in menu mode or don't. -cbreak is the default.
-verbose Generates additional information which query words have been not found in the database and which words of the query are
stopwords.
-conf Use another config than the default config (/etc/perlindex/config).
EXAMPLE
perlindex foo bar
1 3.735 lib/pod/perlbot.pod
2 2.640 lib/pod/perlsec.pod
3 2.153 lib/pod/perldata.pod
4 1.920 lib/Symbol.pm
5 1.802 lib/pod/perlsub.pod
6 1.586 lib/Getopt/Long.pm
7 1.190 lib/File/Path.pm
8 1.042 lib/pod/perlop.pod
9 0.857 lib/pod/perlre.pod
a 0.830 lib/Shell.pm
b 0.691 lib/strict.pm
c 0.691 lib/Carp.pm
d 0.680 lib/pod/perlpod.pod
e 0.680 lib/File/Find.pm
f 0.626 lib/pod/perlsyn.pod
Enter Number or 'q'>
Hitting the keys 1 to "f" will display the corresponding manual page. Hitting "q" quits. All other keys display this manual page.
FILES
The index will be generated in your man directory. Strictly speaking in "$Config{man1direxp}/.."
The following files will be generated:
index_fn # docid -> (max frequency, filename)
index_idf # term -> number of documents containing term
index_if # term -> (docid, frequency)*
index_seen # fn -> indexed?
AUTHOR
Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>
perl v5.14.2 2012-01-26 PERLINDEX(1p)