Sponsored Content
Full Discussion: Perl Question
Top Forums Shell Programming and Scripting Perl Question Post 302252232 by chriss_58 on Wednesday 29th of October 2008 04:33:59 AM
Old 10-29-2008
Perl Question

Hello all,

I have the following line:

xxx|xxxx|xxxx|xxx.xx|xxx

And i insert the values in an array. I am trying to find out if the field[3] of the array (where field[3]=xxx.xx) has the '.' character.
I am using the code below but it doesn't seem to work.

if($field[3]=~ /./)
{
$serv_info3='MMS';
print("FOUND MMS****************************");
}


It seems that it founds the '.' even if it does not exists.
Any help?

Best regards,
Christos
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Question about Perl

Where can i find solid information about programming in Perl? Thank you in advance!!!:) (5 Replies)
Discussion started by: SolidSnake
5 Replies

2. Shell Programming and Scripting

Perl: tk question

When i run my perl/tk script, a perl window pops up behind the GUI window,, can this be hidden???? Also, can the Icon be changed, the Tk icon in every window??? (1 Reply)
Discussion started by: perleo
1 Replies

3. Shell Programming and Scripting

perl question

If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time? i.e. system("ps | grep rminer"); system("ls -al | grep 431"); (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

4. Shell Programming and Scripting

PERL question

Hello, pkzipc of a certain zip file yeilds the following in shell PKZIP(R) Version 6.0 FAST! Compression Utility for AIX Copyright 1989-2002 PKWARE Inc. All Rights Reserved. Registered Version PKZIP Reg. U.S. Pat. and Tm. Off. Patent No. 5,051,745 Viewing .ZIP: test.zip Length... (13 Replies)
Discussion started by: jerardfjay
13 Replies

5. Shell Programming and Scripting

another perl question

I copy and paste from the book but this thing is not working. I cannot figure out what is wrong with myline 9.. can someone please tell me # cat ./sort4.pl #!/usr/bin/perl -w use strict; use warnings; my $input = shift; my $output = shift; open(IN, '<', $input) or die... (4 Replies)
Discussion started by: hankooknara
4 Replies

6. Shell Programming and Scripting

Perl question regarding [ ]

Below program, I do not get why item I am looking for is , instead of . When I do $#text, i get the right value for $value1, but when I do , i get somsething4, instead of somsethingxxxxxxxxxxxxxxxxxxx(which is what I am looking for. when I do , I get empty.. why? what did I do wrong? can you... (2 Replies)
Discussion started by: hankooknara
2 Replies

7. Shell Programming and Scripting

another perl question

I fail to see how below answer is 1? can someone explain this for me? DB<3> $string = "The cat sat on the mat"; DB<4> $animal = ($string =~ m/The (.*) sat/); DB<5> print $animal; 1 (2 Replies)
Discussion started by: hankooknara
2 Replies

8. Shell Programming and Scripting

another perl question

I have a question regarding bulding a hash from a file which has below pattern I thought I could write something like this but clearly my syntax is way off $/ = "\n\n"; $" = "\n"; open(FILE, file1) || die; my %keymaster = ( ); while (<FILE>) { my $topinfo =~... (5 Replies)
Discussion started by: hankooknara
5 Replies

9. Shell Programming and Scripting

PERL Question ...

I am reading a file in perl script .. during the debug the $linein value is : linein : +ASM1,sys,||¬ |3Æqúoü;”ט|| from this line I am getting the tmepuser and password from above : ($tmpuser, $pwd) = ($linein =~ /^$server\s*,\s*(+)\s*,\|\|(.+)\|\|/sm); I am getting $tmpuser and... (2 Replies)
Discussion started by: talashil
2 Replies

10. Shell Programming and Scripting

Perl question about

Hello everybody, I am new at the forum and a total newbie when it comes to Unix. I am trying to see how I can add the ability to kill a user's processes? I want to add this to my Shel Script Add the code/process into a subroutine. Also, I would like to use an array to store the list... (0 Replies)
Discussion started by: kinelisch
0 Replies
ALSEARCH(1)						User Contributed Perl Documentation					       ALSEARCH(1)

NAME
alsearch - Search the AudioLink database for music SYNOPSIS
alsearch [OPTION]... search_option... --td=/some/path/to/create/links/ alsearch [OPTION]... search_option... -s DESCRIPTION
You can use this script to search for songs in the AudioLink database. You can specify one or several options for the artist, composer, lyricist, album, etc., as the search criteria. You can specify several search_option options to search for particular music files. See the section on "search options" for the list of options. The search is not case sensitive. alsearch looks for strings as well as sub-strings in the fields being searched. See the "examples" section for more information. Specifying the --td (target directory) option is mandatory for creating links to the actual files. This directory will contain the symbolic links to the actual audio files. The directory will be created if it doesn't exist. Creating symbolic links to the actual files is analogous to creating playlists in audio-playing software. Symbolic links are actually just point to the actual files on the hard disk. This way of creating and storing playlists is very useful in several ways, some of which are: 1. Compatible across various audio players Since the "playlists" are actually files represented on your hard disk, you can add whole directories generated by the alsearch program in the playlist of your audio software. If you switch to another music player for whatever reason, you still have your playlists. You don't have to bother about compatibility between the playlist formats of the two players. 2. Can be seen and operated upon in a file browser As the symbolic links are present on a file-system, your playlist collection can be viewed by using normal file operations in the shell or using a GUI-based file browsing program. If the file browsing program is supports file traversals and symlinks, it'll show you the information of the actual song. OPTIONS
--help Brief usage information --host=xxx Connects to the MySQL server on the target host. Default is localhost. --pass=xxx Password for the database -s, --na Just displays the search results, doesn't create links (simulation mode) --td=xxx Target-directory in which to create links --user=xxx Username for the database -v, --verbose Displays some extra information. Useful for spotting errors and sending debug information. SEARCH OPTIONS
--album=xxx Search in the "album" field --artist=xxx Search in the artist/band/performers fields. You can give this option multiple times, for example: "alsearch --artist=kishore --artist=asha --td=/songs/asha_kishore" --comment=xxx Search in the "comment" field -c, --composer=xxx Search in the "composer" field --genre=xxx Search in the "genre" field -l, --lyricist=xxx Search in the "lyricist" field --title=xxx Search in the "title" field EXAMPLES
The options that take arguments can be specified in two ways: "alsearch --artist="kishore kumar" --td=/songs/kishore" "alsearch --artist "kishore kumar" --td /songs/kishore" That is, the option and the argument can be separated with a ' ' (space) or an '=' (equal) sign. In case you want to search for a string that has spaces, enclose the string in " ". "alsearch --artist=kishore --composer=burman --lyricist=bakshi" Will search for songs sung by *Kishore*, composed by *Burman* and written by *Bakshi*. Any name in the composer field which have "burman" in them will be matched. This means, it'll find songs composed by RD Burman, SD Burman, etc. This is true for all search fields. SEE ALSO
L<audiolink(1)>, L<alfilldb(1)> The current version of this man page is available on the AudioLink website at <http://audiolink.sourceforge.net/>. BUGS
Report bugs related to the AudioLink software or the man pages to the audiolink-devel mailing list <audiolink-devel@lists.sourceforge.net>. AUTHOR
This manual page is written and maintained by Amit Shah <amitshah@gmx.net> COPYRIGHT
The AudioLink package is Copyright (C) 2003, Amit Shah <amitshah@gmx.net>. All the programs and the documentation that come as part of AudioLink are licensed by the GNU General Public License v2 (GPLv2). perl v5.14.2 2003-12-06 ALSEARCH(1)
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy