Suppose I have the following Perl code:
defined or $_ = "" for my ($alabama, $alaska, $arizona, $arkansas, $california,
$colorado, $connecticut, $delaware, $florida, $georgia, $hawaii, $idaho,
$illinois, $indiana, $iowa, $kansas, $kentucky, $louisiana, $maine, $maryland,
$massachusetts, $michigan, $minnesota, $mississippi, $missouri, $montana,
$nebraska, $nevada, $new_hampshire, $new_jersey, $new_mexico, $new_york,
$north_carolina, $north_carolina, $north_dakota, $ohio, $oklahoma, $oregon,
$pennsylvania, $rhode_island, $south_carolina, $south_dakota, $tennessee,
$utah, $vermont, $virginia, $washington, $west_virginia, $wisconsin, $wyoming)
= split(/\n/, $results);
I want to insert the following lines into my code:
$data{"alabama"} = $alabama;
$data{"alaska"} = $alaska;
$data{"arizona"} = $arizona;
...
$data{"wisconsin"} = $wisconsin;
$data{"wyoming"} = $wyoming;
Is there a way in Vim to parse that line of for loop code to create all fifty
of those lines?
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.