what to know about aligning

Hi
I am a biologist not a bioinformatician, I have two group of sequences (they are nucleotide and in fasta format), each group includes around 40,000 sequences ranging from 100 bp to 12 kb. I want to know how can I align the sequences from a group to the another and find the best pair for each fragment. Can I do it through Perl? if so how can I do that? is there any softwares that can I use?
second Q
how can I find secondary structures of the sequences in each groups? which program should I use?
Thanks
MS