The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl config file Help Harikrishna Shell Programming and Scripting 6 05-20-2008 01:51 AM
Perl config file Help Harikrishna Shell Programming and Scripting 5 05-19-2008 01:40 AM
Extracting data from text file based on configuration set in config file suparnbector Shell Programming and Scripting 3 08-09-2007 11:25 PM
using config file mape Shell Programming and Scripting 1 09-06-2006 10:37 PM
Perl CGI to access / edit "root" owned config files WIntellect Shell Programming and Scripting 1 04-23-2003 12:48 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 38
Stumble this Post!
Perl config file Help

Hi

In My config file i have 12.122.12.111:2000
A host and a port number.

To read the config file i have written in a perl script like this

my %config;
open my $config, '<','config' or die "Failed to read file :$!";

Its running fine in HP-UX but showing error in solaris box.

error is : Too many arguments for open at client.pl line 5, near ""config" ;"
Execution of simpleclient.pl aborted due to compilation errors.

Plz replyy...
Regards
Harikrishna
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-21-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
The tree-argument form of open is a relatively recent addition to Perl (like, this millenium or last; I forget which). See if taking out the '<' and the comma after it would help.
Reply With Quote
  #3 (permalink)  
Old 05-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 38
Stumble this Post!
Quote:
Originally Posted by era View Post
The tree-argument form of open is a relatively recent addition to Perl (like, this millenium or last; I forget which). See if taking out the '<' and the comma after it would help.
Thanks era.. its works
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0