On Aug 6, 2014, at 10:55 AM, ESChamp wrote:
> The program begins
>
> #!/usr/bin/perl
You really should add these two lines:
use strict;
use warnings;
here and correct the mistakes they reveal.
> use Tie::File;
> use File::Copy 'copy';
> use File::Spec;
>
> my $copy="00-copy.htm";
>
The program begins
#!/usr/bin/perl
use Tie::File;
use File::Copy 'copy';
use File::Spec;
my $copy="00-copy.htm";
my $recapfile="00recap.txt";
my $htmfile="00.htm";
my $ct;
tie my @bfile, 'Tie::File', $recapfile or die "cannot tie recapfile and
bfile $!";
tie my @hfile, 'Tie::File',
Cort Morgan wrote:
>
> I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking
> some examples from "Mastering Perl/Tk". I apparently do not understand how to
> use ConfigSpecs. I'm trying to be able to pass arguments to the widget
> constructor and define default values if t
Hi,
I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking
some examples from "Mastering Perl/Tk". I apparently do not understand how to
use ConfigSpecs. I'm trying to be able to pass arguments to the widget
constructor and define default values if the arguments are not s
Tommy Nordgren wrote:
> What's wrong with this script for removing the CVS directories from a
> checked-out CVS workspace?
Are you asking because it is not working correctly?
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my $mypath = '/Users/emac/gcc'
unlink all the files in it, then call rmdir() on the CVS
directory.
Try sticking print statements in it to try to see where it's hanging.
HTH,
- Travis.
Tommy Nordgren <[EMAIL PROTECTED]> wrote:
What's wrong with this script for removing the CVS directories from a
che
On 11/5/06, Tommy Nordgren <[EMAIL PROTECTED]> wrote:
What's wrong with this script for removing the CVS directories from a
checked-out CVS workspace?
I don't know. What do you think is wrong with it? Does it do something
wrong? Does stepping through it with the debugger gi
What's wrong with this script for removing the CVS directories from a
checked-out CVS
workspace?
#!/usr/bin/perl
use strict;
use warnings;
my $mypath = '/Users/emac/gcc';
removecvs( $mypath);
sub removecvs {
my $path = $_[0];
system ('/bin/rmdir&
On 10/30/06, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
I am trying to read a UTF-8 coded file, decode its html character entities,
and print it into another UTF-8 coded file.
The program works fine if I write the line:
$t++; last if $t > 200;
What is the largest value you can use, instead
Hi,
I am trying to read a UTF-8 coded file, decode its html character entities,
and print it into another UTF-8 coded file.
The program works fine if I write the line:
$t++; last if $t > 200;
If I comment that line (for parsing the entire file, and not only the first
200 lines), the program finis
On Sun, Mar 03, 2002 at 07:20:35AM -0500, [EMAIL PROTECTED] wrote:
> Could someone tell me why this doesn't retrieve my cookie?
> use CGI param, header,cookie;
> print header();
> print header(-cookie=>'MY_COOKIE');
header() is for generating an http header, not for reading from it.
print cookie(
Could someone tell me why this doesn't retrieve my cookie?
The cookie has already been set by another page and I just want to retrieve
it.
#!/usr/bin/perl
use CGI param, header,cookie;
print header();
print header(-cookie=>'MY_COOKIE');
> using the Perl4 cgi-lib.pl. However, I can think of no other
> legitimate use. Here's a nice,
> clean method of dealing with this:
>
> use strict;
> use CGI qw/:standard/;
> my %form_data = map { $_, get_data($_) } param;
>
> sub get_data
> {
> my $name = shift;
>
> >Fields are all unique.
>
> Fields are not all unique.
>
>Chocolate
>Vanilla
>Strawberry
I'm sorry Jeff, I meant that in this case, with this script and set of web
pages, the fields are all unique.
For real new beginners, note also another relatively common way that field
names can
--- Jan Gruber <[EMAIL PROTECTED]> wrote:
> Hi !
>
> Sorry for the previous posting, im not yet completely awake ;o)
>
> > > >How can the param's be placed into a new hash?
> > >
> > > CGI.pm has a Vars() method, I believe, which returns a hash.
> > >
> > > use CGI;
> > > my $q = CGI->new;
On Jan 31, Gary Hawkins said:
>> >> for $field (param()) {
>> >> print "$field => ", param($field), "\n";
>> >> }
>> >
>> >How can the param's be placed into a new hash?
>>
>> CGI.pm has a Vars() method, I believe, which returns a hash.
>>
>> use CGI;
>> my $q = CGI->new;
>> $data =
Hi, Gary !
On Thursday 31 January 2002 12:16 pm, you wrote:
> Thanks, I tried and didn't understand it.
Dit it work at all ?
> > I think %data = $q->vars would be better to read and I'm not sure if the
> > Vars() function returns a reference or a hash.
Ok, i'll try
A hash is a data comfort
Hi !
Sorry for the previous posting, im not yet completely awake ;o)
> > >How can the param's be placed into a new hash?
> >
> > CGI.pm has a Vars() method, I believe, which returns a hash.
> >
> > use CGI;
> > my $q = CGI->new;
> > $data = $q->Vars;
> >
> > print $data->{field}; # etc
On Thursday 31 January 2002 11:45 am, you wrote:
> > >> If you want to loop over all the form fields, you'd do:
> > >>
> > >> for $field (param()) {
> > >> print "$field => ", param($field), "\n";
> > >> }
> > >
> > >How can the param's be placed into a new hash?
> >
> > CGI.pm has a Vars(
> >> If you want to loop over all the form fields, you'd do:
> >>
> >> for $field (param()) {
> >> print "$field => ", param($field), "\n";
> >> }
> >
> >How can the param's be placed into a new hash?
>
> CGI.pm has a Vars() method, I believe, which returns a hash.
>
> use CGI;
> my $q
On Tue, 29 Jan 2002, Jeff 'japhy' Pinyan wrote:
> On Jan 29, Jonathan E. Paton said:
>
> >> How can the param's be placed into a new hash?
> >
> >my %hash = param();
> >
> >since param() detects whether it's in list/array/hash
> >context and does the Right Thing.
>
> These is no such thing as "ha
On Jan 29, Jonathan E. Paton said:
>> How can the param's be placed into a new hash?
>
>my %hash = param();
>
>since param() detects whether it's in list/array/hash
>context and does the Right Thing.
These is no such thing as "hash context" or "array context". There is
void context, scalar cont
> > If you want to loop over all the form fields, you'd
> > do:
> >
> > for $field (param()) {
> > print "$field => ", param($field), "\n";
> > }
> >
>
> How can the param's be placed into a new hash?
my %hash = param();
since param() detects whether it's in list/array/hash
context and
On Jan 29, Gary Hawkins said:
>> If you want to loop over all the form fields, you'd do:
>>
>> for $field (param()) {
>> print "$field => ", param($field), "\n";
>> }
>
>How can the param's be placed into a new hash?
CGI.pm has a Vars() method, I believe, which returns a hash.
use CGI
> If you want to loop over all the form fields, you'd do:
>
> for $field (param()) {
> print "$field => ", param($field), "\n";
> }
>
How can the param's be placed into a new hash?
I'm working with a script that uses a lot of $data{'each_thing'} from %data. I
tried replacing all instanc
On Jan 24, Eduardo Cancino said:
>Japhy, may i call u that way?, in this part...
Yes, the name "japhy" is fine -- I prefer its usage as my internet
persona, or whatever you'd like to call it. It's easier to remember than
my real name, at any rate.
># inicia variables.
>> >$to = "info\@domain.m
h CGI.pm can I do this a lot easier???
How could I use de CGI.pm, there is a tutorial or something I can read about
it???
I don't understand how to use de CPAN. Can you give me any pointers???
Thanks everybody...
Lalo.
- Original Message -
From: "Jeff 'japhy
From: "Eduardo Cancino" <[EMAIL PROTECTED]>
> Hi everybody!
>
> The next script runs looks pefectly in IE but in Netscape it shows the
> source of the html...
A again the stupid M$IE looks like its working even though it
should scream ...
>
> # imprime html.
> print <
>
On Jan 24, Eduardo Cancino said:
>The next script runs looks pefectly in IE but in Netscape it shows the
>source of the html...
That is because IE does things that a browser should not do.
># recibe la forma.
>read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>@pairs = split(/&/, $buffer);
Ugh. Y
should be:
# imprime html.
print <
YOU should use the CGI module.. (makes life very easy!)
-Original Message-
From: Eduardo Cancino [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: What's wrong with this?
Hi everybody!
Hi everybody!
The next script runs looks pefectly in IE but in Netscape it shows the
source of the html...
#!c:/perl/bin/perl.exe
# recibe la forma.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
# inicia variables.
$to = "info\@domain.mx";
$from = "info\@domain.mx
A good mailing list to check out for Win32 Perl questions is the
perl-ntadmins list at topica.com.
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 8:13 AM
To: Jorge Goncalvez
Cc: [EMAIL PROTECTED]
Subject: Re:What's wrong with th
Jorge Goncalvez wrote:
>
> Hi, I have this:
> #!/usr/local/bin/perl -w
> use Win32::Registry;
> my $Register ="Software";
> #my $Register2=".DEFAULT\\Software";
> my $hkey;
> my @array= qw($HKEY_LOCAL_MACHINE $HKEY_CURRENT_USER ) ;
>
> foreach (@array)
i don't know this windows module but i gue
33 matches
Mail list logo