That confuses me; I would just copy and paste and that would be it but
I would have no idea how that is working and I don't really want to put
anything in that I don't understand yet. Is there a simpler way that
would be more like:
my $links = #hash here ;
>
> Kyle, et al --
>
> ...and the
Kyle --
...and then Kyle Babich said...
%
% That confuses me; I would just copy and paste and that would be it but
% I would have no idea how that is working and I don't really want to put
I think that's a wise course :-)
% anything in that I don't understand yet. Is there a simpler way th
Kyle, et al --
...and then Kyle Babich said...
%
% This is what I have:
%
% my %pages = ("Yahoo","http://www.yahoo.com/";,
% "Google", "http://www.google.com/";,
% "All The Web", "http://www.alltheweb.com/";);
%
% while ( my ($key, $pages) = each %pages ) {
%print qq{$key};
%
This is what I have:
my %pages = ("Yahoo","http://www.yahoo.com/";,
"Google", "http://www.google.com/";,
"All The Web", "http://www.alltheweb.com/";);
while ( my ($key, $pages) = each %pages ) {
print qq{$key};
}
How could I put this all into a scalar to call up later?
Than
--- Kyle Babich <[EMAIL PROTECTED]> wrote:
> Ok, I've got it down to one problem right now, I need an explicit
> package name for this:
> foreach $key(keys %pages) {
> print "$key\n";
> }
>
> It says I need it for $key but no matter where I put the my it won't
> stop giving me that error
or you could leave out the "$key".
foreach (keys %pages) {
print "$key\n";
}
On Sun, 2002-06-23 at 08:59, Marty Landman wrote:
> At 07:37 AM 6/23/02 -0400, Kyle Babich wrote:
>
> >foreach $key(keys %pages) {
> > print "$key\n";
> >}
> >
> >It says I need it for $key but no matt
At 07:37 AM 6/23/02 -0400, Kyle Babich wrote:
>foreach $key(keys %pages) {
> print "$key\n";
>}
>
>It says I need it for $key but no matter where I put the my it won't
>stop giving me that error. Where in that does the my go?
Kyle, this is a syntactic 'not-nicety' of Perl imho. You need
Kyle --
...and then Kyle Babich said...
%
% Ok, I've got it down to one problem right now, I need an explicit
% package name for this:
% foreach $key(keys %pages) {
% print "$key\n";
% }
Well, only if you use it that way :-)
%
% It says I need it for $key but no matter where I put the
Ok, I've got it down to one problem right now, I need an explicit
package name for this:
foreach $key(keys %pages) {
print "$key\n";
}
It says I need it for $key but no matter where I put the my it won't
stop giving me that error. Where in that does the my go?
>
>
> Kyle --
>
> ...
Kyle --
...and then Kyle Babich said...
%
% Ok, I decided to make my test.cgi into a kind of refernce page for when
% I'm creating my site. There is some kind of problem with my hash.
% Once again can someone explain to me what I'm doing wrong?
As perl tells you, there are a few errors.
%
Ok, I decided to make my test.cgi into a kind of refernce page for when
I'm creating my site. There is some kind of problem with my hash.
Once again can someone explain to me what I'm doing wrong?
Here is what I got from doing perl -Tcw in the shell:
> bash-2.05$ perl -Tcw test.cgi
> bash-2.0
11 matches
Mail list logo