Perl Script issue. What am I doing wrong?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl Script issue. What am I doing wrong?
# 15  
Old 03-19-2009
because you have the variable inside of single-quotes, which kills all variable interpolation. Change to double-quotes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Executing perl script in Linux gives :Exec format error. Wrong Architecture

i have perl script that used to be working great , once i edit it in windows and convert it to UTF-8 and then via FTP return it . also did: chmod +x foo.pl and then when i try to run it : ./foo.pl im getting this error: ./foo.pl: Exec format error. Wrong Architecture.... (4 Replies)
Discussion started by: umen
4 Replies

2. Shell Programming and Scripting

What is wrong with my perl script?

i managed to write a perl script for nagios. now, the script works. but i think there's somethign wrong with the exit codes. because the script doesn't show the output of the results in nagios, it instead shows null. please tell me what i'm doing wrong here: #!/usr/local/bin/perl use... (2 Replies)
Discussion started by: SkySmart
2 Replies

3. Shell Programming and Scripting

Issue regarding dos2unix perl script

Hi All, I have pearl script which will check and convert the file: INFO("dos2unix_cmds".$#{$dos2unix_cmds}); if ( $#{$dos2unix_cmds} == 0 ) { my $convert_cmd = $$dos2unix_cmds; my $rename_cmd = $$dos2unix_cmds; --conversion going here else INFO ("No need to... (8 Replies)
Discussion started by: saps19
8 Replies

4. Shell Programming and Scripting

Perl script issue

Hi All, I have a perl script which I am using in Windows environment. There is one more file called "functions.txt" which is having all the functions defined to used in my perl script. And the path for this function file is defined in my perl script. Howeever sometimes I am getting below error... (4 Replies)
Discussion started by: gr8_usk
4 Replies

5. Shell Programming and Scripting

Simple issue, what is wrong?

I had this working a few days ago but I since changed it. Heres the code x=1 while 1 2 3 4 5 6 1=$(ps -ef | grep process | awk '{ print $2}') if then echo "The database is accepting connections..." echo "Now I will check the next process" 2=$(ps -ef | grep process1 |... (10 Replies)
Discussion started by: jeffs42885
10 Replies

6. Shell Programming and Scripting

Perl...getting wrong output?

Good morning! Im trying to write and learn at the same time a simple script. fTHe script should tell me if a number is odd or even/ #!/usr/bin/perl $num = 10; $string1 = "This number is odd"; $string2 = "This number is even"; if ($num /= 2) { print "$string1\n"; }else{ ... (3 Replies)
Discussion started by: bigben1220
3 Replies

7. Web Development

Accessing a Perl CGI script, security issue

Hi Everybody, I was wondering if it was possible for someone to gain access to my Perl CGI scripts before they are interpreted by Perl (mod_perl on apache2) i.e. getting a hold of my raw scripts and not the html output? Let's say I use the DBI module where I have the hostname, user and... (2 Replies)
Discussion started by: z1dane
2 Replies

8. Shell Programming and Scripting

wrong output in perl script

Hi, Here is my piece of code-- #!/usr/bin/perl my $Time_Stamp ; my $User_Name; my $Success; my $Failure; my $ErrorCode; my $ErrorMsg; my $logDir = $ARGV; my $logPrefix = $ARGV; die "usage: $0 <logDir> <logPrefix>" unless $logDir and $logPrefix; die "Log dir $logDir doesn't... (2 Replies)
Discussion started by: namishtiwari
2 Replies

9. Shell Programming and Scripting

Perl script issue: print

Can someone tell me what I'm doing wrong with my perl script? I am new to Perl. This isn't even the final script, I'm just testing to see if it will print the directories with the files in it. For some reason my output is only printing the 1st, 6th, and last entries of the @sub_dir array. Each... (3 Replies)
Discussion started by: man
3 Replies

10. Shell Programming and Scripting

Perl Script Issue - Please Help * Thanks!!!

Please help me with my script please. I am trying to do the following: 1. Read files for the current directory 2. Open and read from nbe files files only 3. Read only the lines with the results pattern 4. Split the line and print 3rd field Please indicate what line I need to modify. ... (8 Replies)
Discussion started by: jroberson
8 Replies
Login or Register to Ask a Question
MIXER(8)						    BSD System Manager's Manual 						  MIXER(8)

NAME
mixer -- set/display soundcard mixer values SYNOPSIS
mixer [-f device] [-s | -S] [dev [[+|-]lvol[:[+|-]rvol]]] ... mixer [-f device] [-s | -S] recsrc ... mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ... DESCRIPTION
The mixer utility is used to set and display soundcard mixer device levels. It may also be used to start and stop recording from the sound- card. The list of mixer devices that may be modified are: vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2, rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin, phout, video, radio, and monitor. Not all mixer devices are available. Without any arguments, mixer displays the current settings for all supported devices, followed by information about the current recording input devices. If the dev argument is specified, mixer displays only the value for that dev. To modify the mixer value dev, the optional left and right channel settings of lvol[:rvol] may be specified. The lvol and rvol arguments may be from 0 - 100. Omitting dev and including only the channel settings will change the main volume level. If the left or right channel settings are prefixed with + or -, the value following will be used as a relative adjustment, modifying the cur- rent settings by the amount specified. If the -s flag is used, the current mixer values will be displayed in a format suitable for use as the command-line arguments to a future invocation of mixer (as above). The -S flag provides the above output without mixing field separators. To change the recording device you use one of: ^rec toggles rdev of possible recording devices +rec adds rdev to possible recording devices -rec removes rdev from possible recording devices =rec sets the recording device to rdev The above commands work on an internal mask. After all the options have been parsed, it will set then read the mask from the sound card. This will let you see EXACTLY what the soundcard is using for the recording device(s). The option recsrc will display the current recording devices. The option -f device will open device as the mixer device. FILES
/dev/mixer the default mixer device SEE ALSO
cdcontrol(1), sound(4) HISTORY
The mixer utility first appeared in FreeBSD 2.0.5. AUTHORS
Original source by Craig Metz <cmetz@thor.tjhsst.edu> and Hannu Savolainen. Mostly rewritten by John-Mark Gurney <jmg@FreeBSD.org>. This manual page was written by Mike Pritchard <mpp@FreeBSD.org>. BSD
June 2, 2014 BSD