On Sat, Mar 23, 2002 at 03:42:47PM -0500, Jim Conner wrote:
> Perl ignores the white space.
Well, most white space anyway.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
It does *not* matter :)
$stringc = $stringa .",". $stringb;
is the same as:
$stringc = $stringa.","$stringb;
Perl ignores the white space.
- Jim
At 19:01 03.22.2002 -0500, K Clark wrote:
>would someone tell me whether or not the problem with what the original
>post is
There is nothing wrong with the line that does the concatenation in sub
'add'. You have a problem somewhere else it seems. What was the exact
error again?
- Jim
At 23:59 03.22.2002 +, Matthew Harrison wrote:
>the script is part of a web-based role-playing-game. the line in question
>is i
Matthew Harrison wrote:
>
> i need to join $stringa to $stringb with a coma in the middle (no
> whitespaces). i have tried
$ perl -le' $one = "one"; $two = "two";
print $one . "," . $two;
print "$one,$two";
print join ",", $one, $two;
'
one,two
one,two
one,two
John
--
use Perl;
program
fulf
Does it have the same error if you change the line to this?
$newrec = "$record,$word";
-Original Message-
From: Matthew Harrison
To: bob ackerman
Cc: [EMAIL PROTECTED]
Sent: 3/22/02 3:59 PM
Subject: Re: joining 2 strings
the script is part of a web-based role-playing-game
ichael Fowler
> Cc: [EMAIL PROTECTED]
> Subject: Re: joining 2 strings
>
>
> after all this, it was a simple typo, i had accidentally put a comma in
> the place of the first period. I am really, really sorry for messing you
> guys about like this.
>
> On Friday 22 Mar 2002 1
Heh heh! That's OK. Just buy us all a round at some pub when we go across
the pond!
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:34 PM
To: Michael Fowler
Cc: [EMAIL PROTECTED]
Subject: Re: joining 2 strings
after all this, it
Matthew Harrison wrote:
>
> it said scalar found where operator expected.
perldoc perldiag
[snip]
%s found where operator expected
(S) The Perl lexer knows whether to expect a term or
an operator. If it sees what it knows to be a term
when it was expecti
after all this, it was a simple typo, i had accidentally put a comma in the
place of the first period. I am really, really sorry for messing you guys
about like this.
On Friday 22 Mar 2002 11:59 pm, you wrote:
> On Fri, Mar 22, 2002 at 11:40:26PM +, Matthew Harrison wrote:
> > $stringc = $s
22, 2002 4:00 PM
To: bob ackerman
Cc: [EMAIL PROTECTED]
Subject: Re: joining 2 strings
the script is part of a web-based role-playing-game. the line in question
is in the sub called 'add':
#!/usr/bin/perl
###Vars and modules###
use CGI qw/:standard/;
use CGI::Carp "fatalsToBr
, March 22, 2002 4:00 PM
To: bob ackerman
Cc: [EMAIL PROTECTED]
Subject: Re: joining 2 strings
the script is part of a web-based role-playing-game. the line in question
is in the sub called 'add':
#!/usr/bin/perl
###Vars and modules###
use CGI qw/:standard/;
use CGI::Carp "
no. extra white space is ignored. works fine.
note the original that failed did end with a semicolon.
On Friday, March 22, 2002, at 04:01 PM, K Clark wrote:
> would someone tell me whether or not the problem with what the original
> post is because of $stringa.",".$stringb being unbroken? does
would someone tell me whether or not the problem with what the original
post is because of $stringa.",".$stringb being unbroken? does that
matter?
as a fledgling, i always pump alot of space in my scripts, but see some
of the more advanced replies here being different...
ken
On Fri, Mar 22, 20
the script is part of a web-based role-playing-game. the line in question
is in the sub called 'add':
#!/usr/bin/perl
###Vars and modules###
use CGI qw/:standard/;
use CGI::Carp "fatalsToBrowser";
use DBI;
$action = param('action');
$word = param('word');
$rd1 = param('rd1');
$rd2 = param('rd
On Fri, Mar 22, 2002 at 11:40:26PM +, Matthew Harrison wrote:
> $stringc = $stringa.",".$stringb
>
> but it says there is a problem. what should it be?
That's one way of doing it. What does it say the problem is?
Michael
--
Administrator www.shoebox.net
Programmer, S
ngle quotes
>
> -Original Message-
> From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 3:40 PM
> To: [EMAIL PROTECTED]
> Subject: joining 2 strings
>
>
> i need to join $stringa to $stringb with a coma in the middle (no
> whitespaces). i have t
maybe you could show what is in $stringa and $stringb.
show a few lines before and after the line with the error.
there isn't anything wrong with the line as it is here.
On Friday, March 22, 2002, at 03:51 PM, Matthew Harrison wrote:
> the semicolon was in my script i jsut forgot to put in in m
What I am seeing is that you are using the double quote and it should be
single quotes
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 3:40 PM
To: [EMAIL PROTECTED]
Subject: joining 2 strings
i need to join $stringa to $stringb with a
02 3:40 PM
To: [EMAIL PROTECTED]
Subject: joining 2 strings
i need to join $stringa to $stringb with a coma in the middle (no
whitespaces). i have tried
$stringc = $stringa.",".$stringb
but it says there is a problem. what should it be?
--
Matthew Harrison
Internet/Network Servi
the semicolon was in my script i jsut forgot to put in in my email. sorry.
On Friday 22 Mar 2002 11:51 pm, bob ackerman wrote:
> did it say the error was on the line you are showing below, or on the
> next line?
> i am getting at asking if you really end the line with semicolon or not.
>
> On Fri
did it say the error was on the line you are showing below, or on the next
line?
i am getting at asking if you really end the line with semicolon or not.
On Friday, March 22, 2002, at 03:46 PM, Matthew Harrison wrote:
> it said scalar found where operator expected.
>
> On Friday 22 Mar 2002 11
it said scalar found where operator expected.
On Friday 22 Mar 2002 11:44 pm, bob ackerman wrote:
> what did it say the problem was?
> that line is missing a semicolon at end.
>
> On Friday, March 22, 2002, at 03:40 PM, Matthew Harrison wrote:
> > i need to join $stringa to $stringb with a coma
what did it say the problem was?
that line is missing a semicolon at end.
On Friday, March 22, 2002, at 03:40 PM, Matthew Harrison wrote:
> i need to join $stringa to $stringb with a coma in the middle (no
> whitespaces). i have tried
>
> $stringc = $stringa.",".$stringb
>
> but it says there i
i need to join $stringa to $stringb with a coma in the middle (no
whitespaces). i have tried
$stringc = $stringa.",".$stringb
but it says there is a problem. what should it be?
--
Matthew Harrison
Internet/Network Services Administrator
Peanut-Butter Cheesecake Hosting Services
Genstate
www.
24 matches
Mail list logo