Lauri Nikkinen wrote:
Hi Lauri.
The critical part of your program is this.
> my $outfile = '>temp.txt';
> open(OUTFILE, $outfile) or die "Unable to open $outfile: $!";
I think you're using a Windows platform where a filename like that is invalid.
(If you are on Unix and have called a file'>temp
Jenda Krynicky wrote:
If we name the subroutine the code would look like this:
sub read_from_stdin {
return ;
}
...
$next = non_blank(\&read_from_stdin);
that is again the non_blank() would receive a reference to a
subroutine that reads one line from STDIN whenever called.
(actually this is
From: Richard Lee <[EMAIL PROTECTED]>
> http://www.stonehenge.com/merlyn/UnixReview/col08.html
>
> From above article, I am not fully understanding what's going on on
> below code.
>
> 1)is there any difference in $next = $non_blank() and
> $next=$non_blank( sub{ }) in terms of funcaitonalit
On Fri, 2008-11-07 at 05:55 -0800, Jeff P. wrote:
> --- On Fri, 11/7/08, Brent Clark <[EMAIL PROTECTED]> wrote:
>
> > From: Brent Clark <[EMAIL PROTECTED]>
> > Subject: Regex path
> > To: beginners@perl.org
> > Date: Friday, November 7, 2008, 1:46 PM
> > Hiya
> >
> > I have some paths like so.
>
http://www.stonehenge.com/merlyn/UnixReview/col08.html
From above article, I am not fully understanding what's going on on
below code.
1)is there any difference in $next = $non_blank() and
$next=$non_blank( sub{ }) in terms of funcaitonality?
I am not fully understanding the difference in
Jeff P. wrote:
use File::Basename;
my $path = dirname("/home/brent/cgi-bin/scripts/common/ticktaktoe");
my ($var) = $path =~ /.*\/(.+)$/;
Thank You
Worked like a bomb.
Regards
Brent Clark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://
--- On Fri, 11/7/08, Brent Clark <[EMAIL PROTECTED]> wrote:
> From: Brent Clark <[EMAIL PROTECTED]>
> Subject: Regex path
> To: beginners@perl.org
> Date: Friday, November 7, 2008, 1:46 PM
> Hiya
>
> I have some paths like so.
>
> /home/brent/cgi-bin/scripts/common/ticktaktoe
> /home/brent/cgi-
Hiya
I have some paths like so.
/home/brent/cgi-bin/scripts/common/ticktaktoe
/home/brent/cgi-bin/scripts/agent/ticktaktoe
This is my regex.
($q) = $ht_file =~ /^(.*)\/[^\/]+/;
Im trying to get $q to be populated with common or agent.
If anyone can help, it would be appreciated.
Regards
Bre
--- On Fri, 11/7/08, Lauri Nikkinen <[EMAIL PROTECTED]> wrote:
> From: Lauri Nikkinen <[EMAIL PROTECTED]>
> Subject: Re: Retrieve data via DBI and write into a file
> To: [EMAIL PROTECTED]
> Cc: beginners@perl.org
> Date: Friday, November 7, 2008, 9:33 AM
> Thank you for your reply. Using the c
Thank you for your reply. Using the code below I get an error message:
Global symbol "$var1" requires explicit package name at myscript.pl
lin 29.
#!/bin/perl
use warnings;
use strict;
use DBI;
my $dbs = "dbi:ODBC:DRIVER={servername};SERVER={serverip}";
my ($username, $password) = ('username', '
--- On Fri, 11/7/08, Lauri Nikkinen <[EMAIL PROTECTED]> wrote:
> From: Lauri Nikkinen <[EMAIL PROTECTED]>
> Subject: Retrieve data via DBI and write into a file
> To: beginners@perl.org
> Date: Friday, November 7, 2008, 8:28 AM
>
> my $outfile = '>temp.txt';
# ">" is not a part of the regula
Hello,
First post to this forum. I'm trying to retrieve data via DBI and
write it into a text file. Everything works fine with DBI but I don't
know how to write query results into my text file. My code is here:
##
#!/bin/perl
use warnings;
use strict;
use DBI;
my $dbs =
12 matches
Mail list logo