Re: syntax error near unexpected token `;'

2012-02-06 Thread lina
On Tue, Feb 7, 2012 at 12:49 PM, Parag Kalra wrote: > > > On Mon, Feb 6, 2012 at 8:35 PM, lina wrote: >> >> until ($name eq ""); >> do { >>        print "Enter another name, or Enter to stop:\n" ; >>        $name = ; >>        chomp ($name); >>        push @namelist,$name; >> >> } >> >> print @na

Re: syntax error near unexpected token `;'

2012-02-06 Thread Parag Kalra
On Mon, Feb 6, 2012 at 8:35 PM, lina wrote: > until ($name eq ""); > do { >print "Enter another name, or Enter to stop:\n" ; >$name = ; >chomp ($name); >push @namelist,$name; > > } > > print @namelist > This should work. Also start using strict and warnings pragma

Re: Syntax error on use Cwd qw(abs_path);

2011-05-31 Thread Jim Gibson
At 11:10 AM -0700 5/26/11, Derek wrote: Hello, I am getting the following error: bash: /var/www/html/bugzilla/email_in.pl: line 2: syntax error near unexpected token `(' bash: /var/www/html/bugzilla/email_in.pl: line 2: `use Cwd qw(abs_path);' The contents of this file are: #!/usr/bin/perl use

Re: Syntax error on use Cwd qw(abs_path);

2011-05-28 Thread Bob goolsby
Mornin' -- Derek Said: >>> The contents of this file are: #!/usr/bin/perl use Cwd qw(abs_path); >>> If the first line is indeed a blank line, then the default interpreter is invoked. The '#!' has to the the first two characters on the first line of your code. B On Sat, May 28, 2011 at 12:10 P

Re: Syntax error on use Cwd qw(abs_path);

2011-05-28 Thread Uri Guttman
> "D" == Derek writes: D> Hello, I am getting the following error: D> bash: /var/www/html/bugzilla/email_in.pl: line 2: syntax error near D> unexpected token `(' big clue. what is the first word of that line? it is bash! perl is not seeing your script for some reason. so this is not a

Re: Syntax error?

2007-08-23 Thread [EMAIL PROTECTED]
On Aug 23, 4:36 pm, [EMAIL PROTECTED] (Randal L. Schwartz) wrote: > > ""[EMAIL PROTECTED]" == "[EMAIL PROTECTED] com" <[EMAIL PROTECTED]> > > writes: > > "[EMAIL PROTECTED]> Those three things look like sets (unordered) to me not > lists > "[EMAIL PROTECTED]> (ordered). The natural dataty

Re: Syntax error?

2007-08-23 Thread Randal L. Schwartz
> ""[EMAIL PROTECTED]" == "[EMAIL PROTECTED] com" <[EMAIL PROTECTED]> > writes: "[EMAIL PROTECTED]> Those three things look like sets (unordered) to me not lists "[EMAIL PROTECTED]> (ordered). The natural datatype in Perl to represent a set of strings "[EMAIL PROTECTED]> is a hash with

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 6:18 am, [EMAIL PROTECTED] (Alexandru Maximciuc) wrote: > Hello Chris, > > Wednesday, August 22, 2007, 7:44:02 AM, you wrote: > > > I am working a script that is a solution to a problem in Intermediate > > Perl. Here is the script: > > #!/usr/bin/perl -w > > use strict; > > sub check_it

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 1:18 am, [EMAIL PROTECTED] (Alexandru Maximciuc) wrote: > Wednesday, August 22, 2007, 7:44:02 AM, you wrote: > > > unless (grep $item eq $_, %$all_ref{$crew}) { > > this does the job well (I think :) ) > unless (grep $item eq $_, $all_ref->{$crew}) { No. $all_re

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 12:50 am, [EMAIL PROTECTED] (Yitzle) wrote: > http://perldoc.perl.org/functions/grep.html Good advice. Irrelevant to the problem at hand, but good advice nonetheless. > Without testing the code or anything, could it be that: > unless (grep $item eq $_, %$all_ref{$crew}) { > > should b

Re: Syntax error?

2007-08-22 Thread Paul Lalli
On Aug 22, 12:44 am, [EMAIL PROTECTED] (Chris) wrote: > #!/usr/bin/perl -w > use strict; > > sub check_items_for_all { > my $all_ref = @_; This assigns $all_ref to be the number of items in @_. I don't think that's what you want. You are passing a reference to a hash as the first argumen

Re: Syntax error?

2007-08-22 Thread Mr. Shawn H. Corey
Chris wrote: I am working a script that is a solution to a problem in Intermediate Perl. Here is the script: #!/usr/bin/perl -w use strict; sub check_items_for_all { my $all_ref = @_; my $all_ref = shift @_; my @who = keys %$all_ref; my @required = qw(preserver s

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 5:44 am, [EMAIL PROTECTED] (Chris) wrote: > I am working a script that is a solution to a problem in Intermediate > Perl. Here is the script: > > #!/usr/bin/perl -w > use strict; > > sub check_items_for_all { > my $all_ref = @_; > my @who = keys %$all_ref; > > my

Re: Syntax error?

2007-08-22 Thread [EMAIL PROTECTED]
On Aug 22, 5:44 am, [EMAIL PROTECTED] (Chris) wrote: > my @gilligan = qw(red_shirt hat lucky_socks water_bottle); > my @skipper = qw(blue_shirt hat jacket preserver sunscreen); > my @professor = qw(sunscreen water_bottle slide_rule batteries radio); > > my %all = ( > Gilligan => [EMAIL PRO

Re: Syntax error?

2007-08-21 Thread Alexandru Maximciuc
Hello Chris, Wednesday, August 22, 2007, 7:44:02 AM, you wrote: > I am working a script that is a solution to a problem in Intermediate > Perl. Here is the script: > #!/usr/bin/perl -w > use strict; > sub check_items_for_all { > my $all_ref = @_; here is the first err: you should have

Re: Syntax error?

2007-08-21 Thread yitzle
On 8/22/07, Chris <[EMAIL PROTECTED]> wrote: > I am working a script that is a solution to a problem in Intermediate > Perl. Here is the script: > > #!/usr/bin/perl -w > use strict; > > sub check_items_for_all { > my $all_ref = @_; > my @who = keys %$all_ref; > > my @requir

RE: syntax error of some sort?

2007-07-05 Thread Joseph L. Casale
; beginners@perl.org Subject: RE: syntax error of some sort? @list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to u

RE: syntax error of some sort?

2007-07-04 Thread Prabu Ayyappan
@list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to use $_[0] Second Value means $_[1] and so on..

RE: syntax error of some sort?

2007-07-04 Thread Prabu Ayyappan
@list = (Exchange,Filter,DNS,Domain); sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) A semi-colon is missing in the list assignment. if you want to get the first value of the list then you have to use $_[0] Second Value means $_[1] and so on..

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: Heh, I am running out of hair:P I get two errors to start, one is the warning that is better write: my ($vm) = $_[0]; instead of my ($vm) = @_[0]; The proper way to say this is my ($vm) = @_; And looking at your data I would suggest my (

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: Heh, Clearly I need to sleep! This doesn't even work either? #!/usr/bin/perl -w @list = (Exchange,Filter,DNS,Domain) snip You are missing your quotes. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
Heh, Clearly I need to sleep! This doesn't even work either? #!/usr/bin/perl -w @list = (Exchange,Filter,DNS,Domain) sub stop_it { $vm = $_[0]; print "$vm\n"; } stop_it(@list) What is wrong here? jlc -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
Heh, I am running out of hair:P I get two errors to start, one is the warning that is better write: my ($vm) = $_[0]; instead of my ($vm) = @_[0]; And the other is about the use of the global @_ (huh) with "my"? I have this now: #!/usr/bin/perl -w @Exchange = ("/vmfs/volumes/467f06a5-7d59c067-35

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
OK Chase, I saw the missing quotes:) I sniped out the later work using the other elements of the array as to much was broken! I do want to pass in an array and work with all of it. So if I wanted to work with only the first indices to start, is this correct: sub stop_it { my ($vm) = @_[0];

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: snip Is it actually incorrect to run: stop_it(@DNS); aside from maybe looking strange? snip It doesn't look strange, but your code only works with the first element of @DNS so it is pointless. If you want to say stop_it(@DNS) and actually

RE: syntax error of some sort?

2007-07-04 Thread Joseph L. Casale
? So the `/usr/bin/vmware-cmd \"$_[0]\" gettoolslastactive -q`; is correct where the var gets inserted? Thanks! jlc -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 8:15 PM To: Joseph L. Casale Cc: beginners@perl.org Subject: Re: synta

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip snip > The second I am sure is the darn () in the file names I am feeding > into the function. Can someone shed some light :) I need to call the > first indices of many arrays that get passed into this function, so I > was thinking $_[0] was w

Re: syntax error of some sort?

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: snip if ($state == 'on') { 'vmware-cmd $_[0] stop soft'; my $tools = `/usr/bin/vmware-cmd \"$_[0]\" gettoolslastactive -q`; chomp

Re: Syntax Error

2006-09-09 Thread John W. Krahn
AndrewMcHorney wrote: > Hello Hello, > I do not have my perl books with me and so I cannot diagnose the error I > am getting with several if statements. Could someone assist? Do you have the Perl documentation installed on your hard drive? perldoc perldiag > Here is the code: > > #! /bin/per

Re: Syntax Error

2006-09-09 Thread Tom Phoenix
On 9/9/06, AndrewMcHorney <[EMAIL PROTECTED]> wrote: I do not have my perl books with me and so I cannot diagnose the error I am getting with several if statements. What line is the error? What's the error message? Can you find the message in perldiag? if (file_deleted[compare_index] ==

Re: syntax Error ..........

2005-09-02 Thread Jeff 'japhy' Pinyan
On Sep 3, [EMAIL PROTECTED] said: Actually the problem is like this @lookup_datatype = qw ( string(30) string (40) string(10) Real string(10) Integer string(34) ); when my loop encounters this real or Integer or any other element in the array it gives a error problem I want to skip through th

Re: syntax Error ..........

2005-09-02 Thread mayank . ahuja
Consultancy Services Limited Ph:- 044-5816 Cell:- 9283199460 Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> 09/03/2005 12:31 AM To [EMAIL PROTECTED] cc beginners@perl.org Subject Re: syntax Error .. On Sep 3, [EMAIL

Re: syntax Error ..........

2005-09-02 Thread Jeff 'japhy' Pinyan
On Sep 3, [EMAIL PROTECTED] said: foreach my $i (0 ..$#lookup_datatype){ my $plus; ($plus) = /([0-9]+)/ , $lookup_datatype[$i]; I think you want ($plus) = $lookup_datatype[$i] =~ /([0-9]+)/; -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734

Re: syntax Error ..........

2005-09-02 Thread Manav Mathur
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Saturday, September 03, 2005 12:20 AM Subject: syntax Error .. > > Hi Guys... > > Can u plz give me the write syntax for > this > > foreach (@lookup_datatype){ > my $plus; > ($plus) = /([0-9]+)/; > > > print "$plus

RE: Syntax error in Win32:CopyFile()

2002-07-15 Thread Rupert Heesom
] Subject: Re: Syntax error in Win32:CopyFile() on Thu, 11 Jul 2002 19:47:35 GMT, Rupert Heesom wrote: > I'm stuck again! > > "C:\Perl\TIFFPDF>perl -d tiffpdf.pl > usage: Win32::CopyFile($from, $to, $overwrite) at tiffpdf.pl line 39, > line 6." > > The code

Re: Syntax error in Win32:CopyFile()

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 19:47:35 GMT, Rupert Heesom wrote: > I'm stuck again! > > "C:\Perl\TIFFPDF>perl -d tiffpdf.pl > usage: Win32::CopyFile($from, $to, $overwrite) at tiffpdf.pl line 39, > line 6." > > The code line is: Win32::CopyFile $CurrTIFFDir."\\".$_.".tif", > $WorkDir."\\ImageMagick";

RE: Syntax error

2002-05-16 Thread Bob Showalter
> -Original Message- > From: Jaishree Rangaraj [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 16, 2002 10:53 AM > To: [EMAIL PROTECTED] > Subject: Re: Syntax error > > > > Hello All: > > Can anybody please tell me if this syntax is corect. I am >

Re: Syntax error

2002-05-16 Thread Jaishree Rangaraj
Hello All: Can anybody please tell me if this syntax is corect. I am getting syntax error in this block. foreach $sorted_field (@sorted_fields) { if ($Config{'print_blank_fields'} || $Form{$sorted_field}) { $_=$sorted_field; $field=m/