CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
script not recognizing tabs as whitespace


New User

Oct 22, 2013, 2:54 PM

Post #1 of 2 (3583 views)
script not recognizing tabs as whitespace Can't Post

New to the forum and hoping to see if anyone else is having this issue or if it is just me.
I have a scripts that I have been running on a Solaris 10 server for years. The script does an ssh to each of the servers, gets the list of filesystems, checks the space requirement based on filesystem information in a file. The filesystem file looks like this (tabs between entries):
#Filesystem Priority2 Priority1
/ 80 85
/usr/local 80 85
/usr/openv 80 85
/u01 80 85

This script was working great for many years and suddenly it stopped. After reviewing the code, I found that line
($mntpnt, $threshold1, $threshold2) = split(/\s+/, `grep "^$mount_point " $datadir/$host.filesystems`);

was no longer recognizing the tabs as whitespace. If I changed the tabs in the file to be spaces, the script would start working again. The only thing that has changed in the last couple of months has been:
1) Solaris 10 patching
2) Veritas VM upgrade

Has anyone else experience anything similar? My workaround was to change the tabs to spaces, but I would like to figure out why/what cause it to change.

Hoping someone smarter than me has some insight to share.


Oct 22, 2013, 3:50 PM

Post #2 of 2 (3577 views)
Re: [cmullis] script not recognizing tabs as whitespace [In reply to] Can't Post

I suspect that your shell command is no longer returning ASCII TAB characters. Test your command in your shell. If you can find out what it is doing, you can modify the regex in the perl script. If the shell script is working properly, you must have a very strange perl problem.
Good Luck,


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives