On 21 Mar 2003 at 20:32, Matthew Stapleton wrote:
> Hello,
>
> I am learning Perl and having some fun with it. In a script I am writing
> I am wanting to read a line of a file and then extract a digit from the
> beginning of the line. A typical line looks something like this:
>
> 100. text tex
Gufranul Haque <[EMAIL PROTECTED]> wrote:
>
> I am trying to split the each number into an array of charcters
> and then calculating the length of the array
>
> my @digits = split(/\S/, @number[$i])
^
> my @length = @digits
^ these should both be '$'
>
> but som
Matthew Stapleton <[EMAIL PROTECTED]> wrote:
> [...] I am wanting to read a line of a file and then
> extract a digit from the beginning of the line. A
> typical line looks something like this:
>
> 100. text text text
>
> So I am using a file handle to open the file and read
> the lines on by
Hi Wiggins,
I wrote a simple script that is sending a request to
localhost and receiving the response with LWP.
As I am trying to run the script it is ending up with
the error " 403 Forbidden ". I am sending the script
along with this mail bellow.
I've checked the file permission of file3.cgi and
do you mean that you want the 100 in a variable?
If so, here is one way:
while {
# Splitting the line by white spaces.
my $Number = (split /\s+/, $_)[0];
# Deleting the dot at the end.
$Number =~ [EMAIL PROTECTED]@@;
print "$Number\n";
}
HTH,
Yargo.
-
Rob Dixon wrote:
> Scott R. Godin wrote:
>> John W. Krahn wrote:
>> >
>> > Yes, there is. :-)
>> >
>> > my %hash = do { local $/; =~ /[^\n,]+/g };
>>
>> Holy Handgrenades, Batman!
>>
>> but where's the implicit split of key and value there? forgive me for
>> asking, but I just don't see it. is t
Rob Dixon wrote:
> Giarrocco, Camillo wrote:
>> Hi,
>>
>> Can anybody tell me how can I check the size of a file?
>>
>> I know the "if (-s "file") function but never used and don't know the
>> right syntax of it.
>
> Well it's just that really. But you can do more than just test it for
> being n
Randal L. Schwartz wrote:
>> "Scott" == Scott R Godin <[EMAIL PROTECTED]> writes:
>
>>> my %hash = map {/\w+/g}
>>>
>>> :-)
>
> Scott> grin away. This shortcut deserves to be in the perldocs
> Scott> somewhere. I wish I'd seen this before.
>
> The problem is that it is very intolerant of
Ankit Gupta wrote:
> Hi,
>
> I want to print some linux environment variables that have already been
> set. Could some one let me know which command I can use to get value of
> environment variables.
>
> Regards,
> Ankit
perl -le 'print "$_ -> $ENV{$_}" for sort keys %ENV'
--
To unsubscribe
From: "Thomas Williams" <[EMAIL PROTECTED]>
> Thank you all for your help, but it's my fault for forgetting a major
> piece of information.
>
> Not only do I need to send a email with an attachment, through perl,
> but it needs to be through a smtp server that required the username
> and password
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Vinay T.S.) writes:
>Hello,
>
>would like to know if there is a utility to build up a function dependancy
>database, while handling large Perl applications just like cscope does for
>C programs .
Devel::Dprof (comes with Perl). Look for the -T o
Hi,
I've googled for this information and not found much.
Probably just haven't found the right combination of
keywords. I have a project I'm doing to learn about
IRC better. I'm writing a bot in perl (without using
the Net::IRC or POE modules) and I can connect to the
server, join the channel I
Hello All
I installed Linux 8.0(kernel 2.4.18-14) and Perl V5.8.0 and when I try to
run a Perl program with the line
print "Hello World"
it does not work, just perl executed it without an error.
I checked it the script using
perl -c script_name and it return OK
Thanks
--
To unsubscribe, e-
--- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> Hello All
>
> I installed Linux 8.0(kernel 2.4.18-14) and Perl V5.8.0 and when I try to
> run a Perl program with the line
> print "Hello World"
> it does not work, just perl executed it without an error.
>
> I checked it the script using
> per
Hi,
Is there a way (or a module) which enables the creation of MS access files?
Or, is tehre something that will convert an SQL database & all subtables
into an MS access file for viewing?
Thanks in advance.
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [E
dan wrote:
> Hi,
>
> Is there a way (or a module) which enables the creation of MS access files?
> Or, is tehre something that will convert an SQL database & all subtables
> into an MS access file for viewing?
>
> Thanks in advance.
>
> Dan
If you need Access for viewing, why not just import into
> "Stefan" == Stefan Johnson <[EMAIL PROTECTED]> writes:
Stefan> I've googled for this information and not found much.
Stefan> Probably just haven't found the right combination of
Stefan> keywords. I have a project I'm doing to learn about
Stefan> IRC better. I'm writing a bot in perl (witho
Hi,
I'm wondering if there is an issue with the random function in terms of scaling. I
have been testing a merge sort, and I noticed that when my test, built by pushing
rand(10) a given number of times into it, starts getting much higher than 10,000
items, the rnadom numbers start clumpin
18 matches
Mail list logo