It works find for me on one system too...I just cant figure out why not the other system.
Here is the code one more time...just to ensure I copied it right,
It didnt put the spaces in there last time. prompt>perl ./myscript.pl
Still getting the errors:
String found where operator expected at line 95, near "open (MESS1, ""
(Might be a runaway multi-line "" string starting on line 92)
(Missing semicolon on previous line?)
String found where operator expected at line 96, near "open (MESS, ""
(Might be a runaway multi-line "" string starting on line 95)
(Missing semicolon on previous line?)
Scalar found where operator expected at line 96, near "open (MESS, "$mess"
(Do you need to predeclare open?)
syntax error at line 50, near "exit"
syntax error at line 80, near "$mess2:"
(Might be a runaway multi-line "" string starting on line 76)
Missing comma after first argument to open function at line 83, near "">>$mess2") "
Missing comma after first argument to open function at line 84, near ""$mess1") "
syntax error at line 95, near "open (MESS1, ""
Missing right curly or square bracket at line 105, at end of line
syntax error at line 105, at EOF
Execution of ./myscript.pl aborted due to compilation errors.
OS and Version- Not working: linux 2.4.34.2-skas3 Working: HP-UX B.11.11
Current shell: Not working: /bin/bash Working: command didn't work
Perl Version: Not working: This is perl, v5.8.0 built for i386-linux-thread-multi (with 1 registered patch, see perl -V for more detail) Working: This is perl, v5.6.1 built for PA-RISC1.1
Shell version: Not working: 2.05b.0(1)-release Working: command didn't work
Ben
---------- Post updated at 06:11 AM ---------- Previous update was at 05:35 AM ----------
YAY!!! It works now!! THanks radoulov!! I have been looking at this script for 2 days straight trying to figure it out!!
I believe there are couple of syntax issues in my script, couldn't find them :(
can someone help me with fixing it to make it work.
cd /abcde/
#get the latest filename excluding subdirs
filename=`ls -ltr | grep ^- | tail -1 | awk '{print $8}'`
#get system date and file timestamp and... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
This script will analyse the channels.txt e registrations.txt and it will allow to mage the channels and the... (9 Replies)
Original script written on CentOS 6.3 with GNU bash 4.1.2
Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me)
I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
I want to delete archivelog files that has been archived and applied from primary database
to standby database. This piece of script is working in Linux server. However, I copy it to
Unix server with tiny modification. It won't work and generate the error message. I have checked
code carefullt... (8 Replies)
Hi,
Can some one please tell me how to redirect only errors to the log file using perl.
Thanks,
Anjan.
---------- Post updated at 08:41 PM ---------- Previous update was at 08:39 PM ----------
Also, i dont want to use any module. Please tell me in normal way (1 Reply)
Hi,
I am a newbie to PERL and working on a script. When running it I get a lot of compilation errors.
The actual command in the program (which is within a case structure) is given below
# This gives the actual count of inquires from a log file (It works fine when I type this on the... (2 Replies)
Hi , I use the following simple perl script to find the yesterday time
perl -e ' use POSIX(strftime); print POSIX::strftime("%a %b %e %H:%M:%S %Y", localtime(time-86400*$ARGV))' 1
However in the perl version 4 , it gives me the following error :
Do the perl version 4 does not support... (4 Replies)
I recently started as an intern and my manager wanted to see how well I would handle Korn Bourne shell scripting without any prior experience, I have prior programming experience but I keep running into syntax errors with AWK. Please take a look at my simple code and tell me what stupid mistake... (6 Replies)