On Thu, 21 Mar 2002 16:09:42 -0600, [EMAIL PROTECTED] (Camilo
Gonzalez) wrote:
Can someone resend the regex they formulated for checking for valid emails?
I seem to have accidently deleted it. Thanks
Go to www.cpan.org and get the Email-Valid module, the regex is in Valid.pm.
--
To
On Fri, 22 Mar 2002 01:00:48 -0800 (PST), [EMAIL PROTECTED] (Rob Roudebush)
wrote:
I have created basic forms using CGI.pm and now I'm interested in using Apache
mod_perl to speed things up and use associated apache modules. Question: Can I
continue to program using regular CGI, using
Hello to all,
I dont know how to set dbi connection to make connection whith database
EmplDir_MSAccess.mdb
-Create database connection string, login and password variables
my $strConn = EmplDir_MSAccess.mdb;
my $strLogin = Admin;
my $strPassword = ;
-Open the connection
$dbh =
Maxa wrote:
Hello to all,
I dont know how to set dbi connection to make connection whith database
EmplDir_MSAccess.mdb
-Create database connection string, login and password variables
my $strConn = EmplDir_MSAccess.mdb;
my $strLogin = Admin;
my $strPassword = ;
-Open the
Hi all,
I don't understand something.
When I upload a file from my computer to a server, I choose a local file, I
open it, then I print its content into another file.
But if I want to upload a file from my local
/htdocs/ folder into the /images/ folder on the server, how could Perl know
that the
Octavian Rasnita wrote:
When I upload a file from my computer to a server, I choose a local file, I
open it, then I print its content into another file.
But if I want to upload a file from my local
/htdocs/ folder into the /images/ folder on the server, how could Perl know
that the
Hi all
I work in an ORACLE Forms environment. The client is switching to Perl. Is it
possible
to create a complete data entry system for the Web using Perl? ORACLE Forms allows you
to create multiple data entry blocks in a form and to support 1 to many 1 to many
relationships
using multiple
You might try
Programming the Perl DBI (O'Reilly)
perldoc CGI.pm
perldoc DBI.pm
http://search.cpan.org/doc/JURL/DBD-ODBC-0.39/ODBC.pm
http://search.cpan.org/doc/TIMB/DBD-Oracle-1.12/Oracle.pm
http://www.mysql.com
Scot Robnett
inSite Internet
Hi David
I am new to Perl.
Our sys admin has Apache installed and is setting up for us to use Perl, DBI, CGI.
Thanks for responding
Charles
-Original Message-
From: David Kirol [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:40 PM
To: Brice, Charles
Subject: RE: Perl
is there something that says a variable doesn;t get passed when calling a
sub in the same script? i am working on a web-based role-playing game and
this is the script for inside the temple:
#!/usr/bin/perl
##Modules##
use CGI qw/:standard/;
use CGI::Carp
all sorted now, thanks to you experts. it was because I have prefixed my
variables with 'my' which restricted them.
On Friday 22 Mar 2002 3:34 pm, Matthew Harrison wrote:
is there something that says a variable doesn;t get passed when calling a
sub in the same script? i am working on a
if i have a file delimited by commas and i want to make a script that will
search to see if a word, passed in a query string, is in the file, and
redirect to one url if i does and one if it doesn't (both urls are also
passed via query strings)
thanks in advance
--
Matthew Harrison
On 3/22/02 1:26 PM, Matthew Harrison [EMAIL PROTECTED]
wrote:
if i have a file delimited by commas and i want to make a script that will
search to see if a word, passed in a query string, is in the file, and
redirect to one url if i does and one if it doesn't (both urls are also
passed via
This is not the cleanest example, but hopefully it will get you going in the
right direction
#!/usr/bin/perl
use strict;
my $file = /path/to/file; # location of the file
my $firstword = foo; # 1st search word
my $firstlocation = http://www.location1.com;; # 1st URL
my $secondword = bar; #
Whoops, had to fix a comment here...
if ($one =~ /$firstword/) { # searches the 1st column for 1st word
print Location: $firstlocation br;
}
elsif ($one =~ /$secondword/) { # searches **1st** column for 2nd word
print Location: $secondlocation br;
}
else {
print hr;
}
Hi all
I'm trying to update a script originally written by someone else (yeehaw),
and I'm having troubles with the sorting routine.
here's the code snippet.
sub list_files {
#($name, $type, $size, $mtime, $mode) = $_;
sites = keys %das_sites;
sites = sort { lc($a) cmp lc($b) } sites
Dear All,
I have sort of questions, would you please give me some hint, even refering me to a
perldoc would be nice too.
1. When I open a text file with *lines, however, I just want to read the first line,
would this be a good idea ?
open (FILE, textfile.txt); $firstline = FILE; close
Hello, beginners.
Sorry for offtopic.
Could you help me.
How i can decrease time demand fetching for a very simple query? (in my case i have
trouble because table is very big)
Where I can read about this?
fanx.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
The MySQL book by DuBois (published by New Riders) will tell you everything
you need to know about MySQL. Also, it sounds like you don't have any
indexes built for your table if a very simple query is taking a long time.
Indexes will decrease your time to almost nothing, unless your query is not
Hello, JOE.
You wrote 22 ìàðòà 2002 ã., 15:06:36:
1.indexes exist.
2.query like
select count(some_table.itemID) from some_table where keywords like '%begin' or like
'end%'.
3.table ~70M.
MJA The MySQL book by DuBois (published by New Riders) will tell you everything
MJA you need to know
linux environment. have o'reilly cookbook learning perl (2nd ed.).
desire to randomly choose a filename of mp3 files in a directory
containing only mp3's.
then, write the name of this filename to a file that has
http://myurl.org/mywebpath/...; inserted before the filename so that i
end up
Ya gotta write it yourself. You should look at the function glob() and
rand() for starters.
-Original Message-
From: K Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 8:30 AM
To: [EMAIL PROTECTED]
Subject: how to randomly choose mp3 from dir, print mp3_filename for
Here's what i have, and here's the problem. and here's what i 'think' i
have to learn/do to fix it:
#/usr/bin/perl -w
use strict;
#
# script to randomly choose a song
# and embed html with a link to it
#
my @mp3 = glob(/www/mp3/*.mp3);
#
# put while statement
my $mp3 =~ s#.*/##;
srand;
print
read up on substitution. You need to put the array through a foreach loop.
foreach my $mp3 (@mp3s){
$mp3 =~ s#/www/mp3/##;
}
Can you e-mail me that MP3 (the one you used as an example)?
-Original Message-
From: K Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, March
Hi all
In the program below I am attempting to count the number of times that a phone
number(purely digits) occurs in a file of text.
I am not succeeding cause i end up counting all the digits of phone numbers that
occurs.
Could anyone help.
In the program below I don't know when to stop the loop.
(CTRL + d ) will just terminate the program, leaving the
data via STDIN unattended, this is my problem.
Lets define what I want to do:
I want to print the frequency of every word at the beginning.
and every word at the end of a
i have defined a sub using
sub mysubname{
code here
}
but how do i call it? i have tried just having the name but that doesn't
work.
--
Matthew Harrison
Internet/Network Services Administrator
Peanut-Butter Cheesecake Hosting Services
Genstate
www.peanutbuttercheesecake.co.uk
--
To
On Fri, Mar 22, 2002 at 09:37:05AM -0500, David Gray wrote:
while(STDIN) will create an infinite loop,
No, it won't. The while (FILEHANDLE) idiom will read one line at a
time and automatically terminate the loop at the end of the file.
so you do need some sort of
sentinel value to break
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Subject: callin subs
i have defined a sub using
sub mysubname{
code here
}
but how do i call it? i have tried just having the name but
that doesn't
work.
--
Matthew Harrison
mysubname();
If
Hello
In order to increase the time execution of a Perl script, I wonder if it is
possible to reduce the time loading of a module at the compilation step. In
particular, is the time loading reduced when just one of the symbols
exported by the module is used ? I mean, does the instruction 'use
Hello
Does it exist a CPAN module that computes the exhaustive graph of the
subroutines of a script ?
Example:
Suppose script.pl contains the following code :
sub routine_B2 { ... }
sub routine_B1 { ... }
sub routine_A2 { ... routine_B2(); ... }
sub routine_A1 { ... routine_B1(); ... }
Bonjour,
Afin d'ameliorer le temps d'execution des scripts, je me demande s'il est
possible de reduire le temps de chargement des modules a la phase de
compilation. En particulier, est-ce que le temps de chargement est reduit
dans le cas ou un seul des symboles exportes par le module est
I think this is a prime example of TMTOWTDI (There's More Than One Way
To Do It) - you now have two choices for how to indicate the end of
input to your while(STDIN) loop:
1) pressing ^Z instead of ^D
2) breaking out of your loop when you see certain input indicating end
of input
-dave
ps - I
Hi all,
Firstly, thanks for all your help, its really appreciated !!
I emailed [EMAIL PROTECTED] and asked about using HTML templates instead of
embedding my HTML in my perl scripts. It was suggested that I use the
following code.
- filename = sample.pl
Yes Perl is very useful for doing the work stated, but the group needs to know
from either a script you want to change or showing some code you desire to change, so
they can assist and hopefully point you in the right direction.
move,copy,rename can be handled by File::Copy
HI Rebecca --
I an still a newbie but I really learned alot from this tutorial:
http://www.netcat.co.uk/rob/perl/win32perltut.html
After you go thru this tutorial then give learning perl a try. I bet it
will be alot easier then:-)
Best of luck; perl is really good for windoze admin stuff.
I am writing a perl front-end to create dynamic queries on a mysql
database, and i'm a pretty new programmer!
I want to offer the user a date range, and the dates I want to use are
stored in records in my database:
2002-02-17
2002-02-24
2002-03-02
2002-03-09
2002-03-15
and I kow how to
HI all --
Awhile ago I posted a question about accessing Windows Task Scheduler
from Perl. Unfortunately, I didn't get a response. Anyways, I found a
nice module and wanted to let everyone know incase someone wanted to use
Task Scheduler from perl.
http://taskscheduler.sourceforge.net
Check
First of all, you are only matching a single digit. You want to change your
regular expression from /(\d)/ to /(\d+)/, which matches one or more digits,
and slurps up as many as it finds in a row. One issue you will have is that
a file containing addresses, you are also going to get a count on
K Clark wrote:
linux environment. have o'reilly cookbook learning perl (2nd ed.).
desire to randomly choose a filename of mp3 files in a directory
containing only mp3's.
then, write the name of this filename to a file that has
http://myurl.org/mywebpath/...; inserted before the
K Clark wrote:
Here's what i have, and here's the problem. and here's what i 'think' i
have to learn/do to fix it:
#/usr/bin/perl -w
use strict;
#
# script to randomly choose a song
# and embed html with a link to it
#
my @mp3 = glob(/www/mp3/*.mp3);
#
# put while statement
my
I have a script that generates test questions and grades them . I was
asked to make them generate in a random order , can someone point me in the
right direction
They come in two files make_test.cgi and grade.cgi
#! /usr/bin/perl
#
#make test for Cram Program
#
# version
I am writing a perl script. In it, I need to call another script that
happen to be written in tcl. I need to pass arguments to that tcl script.
Also, I need to get some return values from that tcl script.
What is the best way for me to do that?
Thanks.
This worked for me while I was a TA.
my $numberOfStudents = scalar keys %Grade;
my @studentGrades = map { rand(100) } (1 .. $numberOfStudents);
foreach my $student (keys %Grade){
%Grade{$student} = shift @studentGrades;
}
-Original Message-
From: FLAHERTY, JIM-CONT
Bruce Ambraal wrote:
Hi all
Hello,
In the program below I am attempting to count the number of times that a phone
number(purely digits) occurs in a file of text.
I am not succeeding cause i end up counting all the digits of phone numbers that
occurs.
Could anyone help.
I appreciate the replies so much. I start out with a command line like
this: backup.bat mm dd yy
where mm is the 2-digit month, dd is the 2-digit day, yy is the 2-digit
year, and is the 4-digit year. Those are my variables, as I suppose
they would be called. (Besides some programming
Hi All, I was trying to generate variations of the 8 character string
by changing every character with the elements containing in
an array @aa = ('A', 'B', 'C', 'D'). The way I did it was quite naive,
using a for loop that changes the A character at position 1 of the
string by
At 04:50 PM 3/22/02 +0100, Patrice Boisieau wrote:
Bonjour,
Afin d'ameliorer le temps d'execution des scripts, je me demande s'il est
possible de reduire le temps de chargement des modules a la phase de
compilation. En particulier, est-ce que le temps de chargement est reduit
dans le cas ou un
At 04:43 PM 3/22/02 +0100, Patrice Boisieau wrote:
Hello
Does it exist a CPAN module that computes the exhaustive graph of the
subroutines of a script ?
It is not possible in general to tell such things from a Perl program
because it could always call a subroutine that is generated at
At 12:01 PM 3/22/02 -0800, I wrote:
At 04:43 PM 3/22/02 +0100, Patrice Boisieau wrote:
Hello
Does it exist a CPAN module that computes the exhaustive graph of the
subroutines of a script ?
It is not possible in general to tell such things from a Perl program
because it could always call a
I'm on my day off, so I can't test this, but it should get you started.
use File::Copy;
#Get the date variables based on system time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
@months = qw(00NUL 01JAN 02FEB 03MAR 04APR 05MAY 06JUN
if i have a file delimited by commas and i want to make a script that will
search to see if a word, passed in a query string, is in the file, and
redirect to one url if i does and one if it doesn't (both urls are also
passed via query strings)
thanks in advance
--
Matthew Harrison
my random mp3 script works with strict and warnings (yeah!). now, i want
to do a second task with it, which is additionally write the data of
$inc to a file, named mp3.inc. Here's what i have. i can't find the
reference to doing this. even the correct perldoc pointer would be
wonderful.
perldoc -f print
print FILEHANDLE LIST;
In your case:
print MP3 $inc\n; # \n is a newline character
-Original Message-
From: K Clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 3:40 PM
To: [EMAIL PROTECTED]
Subject: write variable's contents to file :WAS: how to
Pedro A Reche Gallardo wrote:
Hi All,
Hello,
I was trying to generate variations of the 8 character string
by changing every character with the elements containing in
an array @aa = ('A', 'B', 'C', 'D'). The way I did it was quite naive,
using a for loop that changes the A
is there something that says a variable doesn;t get passed when calling a
sub in the same script? i am working on a web-based role-playing game and
this is the script for inside the temple:
#!/usr/bin/perl
##Modules##
use CGI qw/:standard/;
use CGI::Carp
all sorted now, thanks to you experts. it was because I have prefixed my
variables with 'my' which restricted them.
On Friday 22 Mar 2002 3:34 pm, Matthew Harrison wrote:
is there something that says a variable doesn;t get passed when calling a
sub in the same script? i am working on a
Thanks for the input. The only trouble I would have with that is the file
size. My files are HUGE. I don't think the admins around here would like me
doing that. What I was thinking was to generate an array with a bunch of
random numbers in numerical order. Then run through the file and print
If the code then change if( $i = $array[$j] ) to if( $i == $array[$j] )
otherwise you end assigning $i with the value of $array[$i].
Wags ;)
-Original Message-
From: Balint, Jess [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 13:04
To: '[EMAIL PROTECTED]'
Subject: Re:
I just typed the code in the e-mail. It was part of my program. Sorry.
-Original Message-
From: Wagner-David [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:16 PM
To: 'Balint, Jess'; '[EMAIL PROTECTED]'
Subject: RE: Random sampling in perl
If the code then change if(
If you want to search line by line, use this:
while( CSVFILE ) {
if( /searchword/ ) {
# redirect to url
}
}
# redirect to OTHER url
This will go through the file, line by line and check for the word. If found
you will need to add code to go to the URL you want.
I know many have probably answered this but Im just going down my email
list. Here is the answer:
@asplit = split(//,$a);
That should be it.
- Jim
At 22:41 03.20.2002 -0800, Raja Gopal wrote:
Hello Perl Experts,
I want to split the string $a =abcdef;
as @asplit = (a,b,c,d,e,f).
Is
I'm trying to build a forking server which uses unix domain sockets for
communication (on solaris 7).
I've run into a problem where once a connection has been established and
serviced by a child, my domain socket won't accept any more incoming
connections.
I modified my code so it doesn't fork
K Clark wrote:
my random mp3 script works with strict and warnings (yeah!). now, i want
to do a second task with it, which is additionally write the data of
$inc to a file, named mp3.inc. Here's what i have. i can't find the
reference to doing this. even the correct perldoc pointer would be
Oops, I didn't realize this was cross-posted, and replied to the first
instance I saw (the beginner's CGI list). The Perl beginner's and Perl
beginner's CGI lists are, for the most part, mutually exclusive. (Does it or
does it not have to do with CGI?). Please don't cross post, people. I assure
Try something like this:
my $string = ;
my @aa = qw(A C D E F G H I K L M N P Q R S T V W Y);
foreach(@aa){
my $i;
my @strArray = split //,$string;
for($i = 0;defined $strArray[$i];$i++){
my $j;
for($j = 0;defined $strArray[$j];$j++){
if($j == $i){
Oh, hey, didn't see this response. Ignore mine. This is better. :) I
really need to start using substr(). One question, though. Are there any
caveats or down sides to using it?
-Original Message-
From: John W. Krahn
To: [EMAIL PROTECTED]
Sent: 3/22/02 12:46 PM
Subject: Re: string
I've removed [EMAIL PROTECTED] from the Cc: list. I don't see how any
of this directly relates to CGI. Please avoid cross-posting unless relevant
and absolutely necessary.
On Sat, Mar 23, 2002 at 05:30:25AM +0800, Connie Chan wrote:
1. When I open a text file with *lines, however, I just
Hi,
I am currently stuck with developing an elegant solution for splitting a
long text line into an array of strings of the certain maximum length and
it should be split at online at word bounderies. So, my criterias are max
length (78 chars) and split at \b.
Is there any standard routine to
while($text =~ /(\b.{0,78}\b)/g){
push @array, $1;
}
-Original Message-
From: Oliver Andrich
To: [EMAIL PROTECTED]
Sent: 3/22/02 2:46 PM
Subject: Regex or code sample to split a text line
Hi,
I am currently stuck with developing an elegant solution for splitting a
long text line
Check out page 219 of the Perl Cookbook...
s(^.*/)()
Chris
- Original Message -
From: K Clark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 8:14 AM
Subject: RE: how to randomly choose mp3 from dir, print mp3_filename for e
mailing to a list]
Here's what i
'close $sock' in the child?
Wouldn't that kill the socket for the parent. Then no more connections for
parent.
also, why 'fork' in the client? what's the point?
On Friday, March 22, 2002, at 01:33 PM, Ross Simpson wrote:
I'm trying to build a forking server which uses unix domain sockets
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
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 is a
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 in
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
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 Friday,
This program worked for me:
#!/usr/bin/perl
$stringa = apple;
$stringb = banana;
$stringc = $stringa . , . $stringb;
print $stringc\n;
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 3:40 PM
To: [EMAIL PROTECTED]
Subject: joining 2
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
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
what difference would that make? double quotes would only try and do
variable substitution.
It wouldn't do anything with a comma.
On Friday, March 22, 2002, at 03:50 PM, Jon Riddle wrote:
What I am seeing is that you are using the double quote and it should be
single quotes
-Original
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,
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 =
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,
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
Looks like eiter $record or $word is a scalar where perl is looking for an
operand. try:
die $record;
or
die $word
to see what the data is. You can only use the . to concatenate strings.
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22,
This may not be it but did you check the database to see what info is being
passed to $record = $results[0]; or you can check the HTML page that $word =
param(word); gets its info from?
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:00
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 =
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
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 was a
sure
On Saturday 23 Mar 2002 12:37 am, you wrote:
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]
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. the line in
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
fulfillment
--
Dear All,
I have sort of questions, would you please give me some hint, even refering me to a
perldoc would be nice too.
1. When I open a text file with *lines, however, I just want to read the first line,
would this be a good idea ?
open (FILE, textfile.txt); $firstline = FILE; close
1. It will only read the first line. The time you want to be careful with
is when you are assigning it to a list. For example, @myarray =
INFILE; will assign the entire contents of the file, while $myscalar =
INFILE; will assign only the first line.
2. In Windows, the endline character is
Oops! The exclamation point in number 7 was a typo.
-Original Message-
From: Timothy Johnson
To: 'Connie Chan '; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 3/22/02 1:59 PM
Subject: RE: Sort of Conceptual, Syntax, and modules related questions
1. It will only read the first line.
96 matches
Mail list logo