Tor Hildrum wrote:
>
> On 17/2/02 06:01, "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> >>
> >> open (WRITEFILE, ">$names[2]") || die ("Couldn't open $names[2]
> >> for writing\n");
> >
> > You should include the $! variable in your error messages.
>
> I don't really know what $! is.
> I tried look
Tor Hildrum wrote:
>
> I have 2 questions.
>
> Here is the code:
> #!/usr/bin/perl
> use warnings;
> use strict;
Very good start.
> # Merging two files
>
> print ("Write the two files you wan't to merge and \n");
> print ("lastly the file to merge them too, seperated by a space.\n");
Parent
Hi All,
I'm not new to perl, however I would like to pick up some object-oriented perl.
Can anyone out there recommend a good BEGINNER'S tutorial out there? I've spent
some time searching on Google, couldn't find much for a oo newbie. Right now,
I reading Randal's oo tutorial on CPAN.
Thanks
I have 2 questions.
Here is the code:
#!/usr/bin/perl
use warnings;
use strict;
# Merging two files
print ("Write the two files you wan't to merge and \n");
print ("lastly the file to merge them too, seperated by a space.\n");
chop (my $filenames = );
my @names = split(/ /,$filenames); # Get t
On 2/16/02 7:15 PM, "Briac Pilpré" <[EMAIL PROTECTED]> wrote:
> To iterate over a hash, you want to use the keys() function.
I once knew that, but I haven't used perl enough so I forgot. I gues that's
why they call this list "Beginners." Thanks a lot
- geoff
--
To unsubscribe, e-mail:
On Sat, Feb 16, 2002 at 07:07:28PM -0500, Geoffrey F. Green wrote:
> my %table = (
> "key1" =>
> {search=> "alpha",
> shortname=> "beta",
> },
> "key2" =>
> {search => "gamma",
>
On Sun, 17 Feb 2002 at 00:07 GMT, Geoffrey F. Green wrote:
> Hi. Newbie to perl here. I've got two problems (well, two perl-related
> problems), relating to the same program.
To iterate over a hash, you want to use the keys() function.
foreach my $keys ( keys %table) {
print $table{$ke
Hi. Newbie to perl here. I've got two problems (well, two perl-related
problems), relating to the same program.
1. I'm putting together some test programs to try to get down the syntax for
references, etc., but I'm coming across a weird situation I can't figure
out. I'm setting up a hash of ha
Hi,
I'm starting to look at perl db's, and I ran across
something, but I'm not sure what it's about.
I have questions.
In the below code, if I comment out "use DB_File";
I get an unsorted printout, and only 2 files are
created, dbmdatabase.dir and dbmdatabase.pag.
Everything seems fine.
If I l
Hey, any help would be appreciated.
I just wanted to make a simple backup script to backup any file i
specified quickly.. and eventually let it accept options and whatnot for
directories, but right now, I'm just trying to get it to keep the file
permissions of the original file. I'm using File::C
Angus Laycock wrote:
>
> Hi,
Hello,
> I want to print messages from a script to either
> STDOUT or STDERR depending on a value of a variable.
> I want to control where I send the print statements
> to. Can I do something like this or are there other
> ways to control the target I send my messag
Hi,
I want to print messages from a script to either STDOUT or STDERR depending on a value
of a variable. I want to control where I send the print statements to. Can I do
something like this or are there other ways to control the target I send my message
to. I'm hoping there are lots of other
Em Sábado 16 Fevereiro 2002 14:53, Chris escreveu:
> I'm using redhat linux 7.2 and have a question about running
> perl scripts. How do you make it so you do not have to type
> "perl script.pl" every time you want to run a scripts. I just
> want to be able to type the name of my script. Thanks.
Ah shoot...
On Saturday, February 16, 2002, at 12:04 PM, Chris Garaffa wrote:
>
> ../script.pl
>
Should have been
../script.pl
one period (damn typos)
My apologies
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At the beginning of the script (on the first line), put
#!/usr/bin/perl
or whatever the path to your perl binary is
Make sure you chmod the .pl file with correct permissions, and then type
../script.pl
On Saturday, February 16, 2002, at 11:53 AM, Chris wrote:
> I'm using redhat linux 7.2 and hav
I'm using redhat linux 7.2 and have a question about running perl scripts.
How do you make it so you do not have to type "perl script.pl" every time
you want to run a scripts. I just want to be able to type the name of my
script. Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
In article <002501c1b66e$b8594340$cbfea8c0@agustinr> wrote "Agustin Rivera"
<[EMAIL PROTECTED]>:
> How would I keep the character (or characters) that I am splitting by?
>
> for example,
>
> @tags=split(/>/, $line);
>
> I would like to keep the ">".
>
print join("\n",split /(?=\>)/, "1>2>3>"
In article <[EMAIL PROTECTED]> wrote "Ron
Goral"
<[EMAIL PROTECTED]>:
> Can someone please tell me why the following code only returns the last element in
>the referenced
> array? If I put the foreach routine inside the while loop, I get a printout of each
>element in
> both the $sqlRes refer
In article <[EMAIL PROTECTED]> wrote "Eric Beaudoin"
<[EMAIL PROTECTED]>:
> At 22:56 2002.02.15, Jim Witte wrote:
>> What is the difference between \[^x]*[^a]*cleaning up a
>> webpage, trying to find paragraph tags followed by list-item tags (some of which
>had a space
>> inside the tag), wit
In article <01c1b6e3$01433e20$62a3933e@w3w6d9> wrote "Mb" <[EMAIL PROTECTED]>:
> Sure i m the only one doing perl in the week-end, the mailinglist is deserted.
:-)
>
> I' m tryig to generate dynamic SQL statements.
> I have a problem on getting a WHERE over 'varchar' type fields.
I don'
On Thursday, February 14, 2002, at 08:12 PM, Michael Fowler wrote:
> On Thu, Feb 14, 2002 at 04:14:39PM -0500, Ian P. Thomas wrote:
>>
>> # The array, unchecked_dfa_states, is going to be an array of arrays
>> ( 2-D ).
>> # dfa_state_creation is a subroutine that returns an array, and takes
>>
I love HTML::Mason, although you may have a tough decision, as there are several
good templating systems out there. Here's why I like Mason:
1) It's easy to setup, and has good error handling so if you goof up you can fix
your code quickly , something I do alot of ;). Speaking of that, I find the
Hi all,
Sure i m the only one doing perl in the week-end, the mailinglist is deserted.
I' m tryig to generate dynamic SQL statements.
I have a problem on getting a WHERE over 'varchar' type fields.
for ($i =0; $i I want to get 'mars'.
"select DE_Intitule, @select from F_Depot $stringW" -
On Sat, 16 Feb 2002 at 01:19 GMT, Naika - Ev1 wrote:
> I'm trying to write to a file from a 5 choice radio form and I keep
> getting this error
> Undefined subroutine &main::param called at pollresults_rg.pl line 5.
> What does that mean?
It means that the param() subroutine can't be found in th
24 matches
Mail list logo