Find Jobs
Hire Freelancers

Perl question/assitance (not looking for an application)

$30-5000 USD

Concluído
Publicado há mais de 20 anos

$30-5000 USD

Pago na entrega
I use DB_File and SDBM for all of my database needs in Perl..mainly because I can't find any good perl-MySQL tutorials. All the tutorials I find are just for MySQL, but not how to use Perl with it. What I need someone to do is teach me how to sort a complex hash. Please read full description below. ## Deliverables I use DB_File and SDBM for all of my database needs in Perl..mainly because I can't find any good perl-MySQL tutorials. All the tutorials I find are just for MySQL, but not how to use Perl with it. Anyway, I almost always store multiple values in tied hashes. For example: my %db; my $db = "[login to view URL]"; tie %db, "DB_File", "$db", O_CREAT | O_RDWR, 0644, $DB_BTREE or die "Cannot open file 'db': $!\n"; my $joined = join("::", $num, $ip, $time); $db{$url} = $joined; Then whenever I extract data, I split on :: into variables again. That's simple enough, the problem is I need to be able to sort on ANY variable split. For example, if in my database I had keys/values like: [login to view URL] 43::[login to view URL]::12355334543 [login to view URL] 23::[login to view URL]::5442234556 [login to view URL] 924:[login to view URL]::3221234565 Basically I use a URL as a key, then I use a NUMBER ($count):: an ip ($ip) :: time() ($time). I need someone to write me up a VERY VERY VERY basic example on how I could sort by any of $count, $ip, $time. To get an idea what I'm trying to do, please take a look at [login to view URL] . I want to make the table headers for COUNT, IP and TIME to be linked into [login to view URL] or ip or time Remember, the hash key and all the other data MUST be tied together some how. I can't just sort the varible and lose the rest. Please note: I've asked this question in two places: [login to view URL] [login to view URL] Your solution must be different than any proposed in those two links.. I need an easy-to-understand and implement way to do this, I don't understand array referencing so please refrain from that. In conclusion: I am looking for someone to write up a VERY easy to understand example on how to set a sort like this up and I'd like it to be as commented out as much as possible so I can better understand it. If I don't understand the script, the project isn't completed until we talk it over through here or in email until I understand why and how it works. (also: I'm not sure if it matters, but I need examples on how to sort numbers and strings since I'll be using this on other scripts as well). ## Platform not dependent exactly.
ID do Projeto: 3086486

Sobre o projeto

2 propostas
Projeto remoto
Ativo há 20 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$7 USD em 7 dias
4,8 (13 avaliações)
3,9
3,9
2 freelancers estão ofertando em média $8 USD for esse trabalho
Avatar do Usuário
See private message.
$8,50 USD em 7 dias
0,0 (2 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
4,9
54
Membro desde out. 17, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.